几何尺寸与公差论坛

 找回密码
 注册
查看: 2864|回复: 0

Annotation::GetPosition

[复制链接]
发表于 2008-4-1 16:14:35 | 显示全部楼层 |阅读模式
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.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 00:10 , Processed in 0.037684 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表