|
See Also
Example
[url=javascript:BSSCPopup('../AvailabilityOfFunctions/AvailableIn2000_FCS.htm');]Availability[/url]
Description
This method gets the position of this annotation.
Syntax (OLE Automation)
retval = Annotation.GetPosition ( )
Return:
(VARIANT) retval
VARIANT SafeArray of doubles (see [url=mkMSITStore:SW2008SolidWorksapisldworksAPI.chm::/Annotation/Annotation__GetPosition.htm#Remarks]Remarks[/url])
Syntax (COM)
status = Annotation->IGetPosition ( retval )
Output:
(double*) retval
Pointer to an array of doubles (see [url=mkMSITStore:SW2008SolidWorksapisldworksAPI.chm::/Annotation/Annotation__GetPosition.htm#Remarks]Remarks[/url])
Return:
(HRESULT) status
S_OK if successful
Remarks
The retval is an array of 3 doubles, the x, y, z origin of the annotation.
If this method is not successful in retrieving the position of the annotation, the VARIANT SafeArray is empty (OLE Automation only), or the status value is S_FALSE (COM only). Make sure that you check this value before using the returned position.
The following table lists the types of annotations that this method supports and the position of the x, y, z origin. In a drawing, the x, y, z origin is relative to the origin of the drawing sheet (the lower-left corner of the sheet).
Type of Annotation
Position of XYZ Origin
[url=mkMSITStore:SW2008SolidWorksapisldworksAPI.chm::/DatumTag/DatumTag.htm]Datum Feature Symbols[/url]
Point where leader hits symbol
[url=mkMSITStore:SW2008SolidWorksapisldworksAPI.chm::/DatumTargetSym/DatumTargetSym.htm]Datum Target Symbols[/url]
Centerpoint of the circle that is attached to the leader
[url=mkMSITStore:SW2008SolidWorksapisldworksAPI.chm::/Dimension/Dimension.htm]Dimensions[/url]
Upper-left corner of the text box of the dimension
[url=mkMSITStore:SW2008SolidWorksapisldworksAPI.chm::/Gtol/Gtol.htm]Geometric Tolerances[/url]
Upper-left corner of the symbol
[url=mkMSITStore:SW2008SolidWorksapisldworksAPI.chm::/Note/Note.htm]Notes[/url]
Upper-left corner of the text box
[url=mkMSITStore:SW2008SolidWorksapisldworksAPI.chm::/SFSymbol/SFSymbol.htm]Surface Finish Symbols[/url]
Lower-left point of symbol
[url=mkMSITStore:SW2008SolidWorksapisldworksAPI.chm::/TableAnnotation/TableAnnotation.htm]TableAnnotation[/url]
Position of x,y,z determined by [url=mkMSITStore:SW2008SolidWorksapisldworksAPI.chm::/TableAnnotation/TableAnnotation__AnchorType.htm]TableAnnotation::AnchorType[/url]
Weld Symbols
Left endpoint of the main horizontal line in the symbol
If you use this method on any other types of annotations, SolidWorks takes no action and returns FALSE. |
|