几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   Annotation::GetPosition (http://www.dimcax.com/hust/showthread.php?t=1828)

huangyhg 2008-04-01 04:14 PM

Annotation::GetPosition
 
See Also

Example

Availability







Description

This method gets the position of this annotation.



Syntax (OLE Automation)

retval = Annotation.GetPosition ( )



Return:

(VARIANT) retval

VARIANT SafeArray of doubles (see Remarks)





Syntax (COM)

status = Annotation->IGetPosition ( retval )



Output:

(double*) retval

Pointer to an array of doubles (see Remarks)

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

Datum Feature Symbols

Point where leader hits symbol

Datum Target Symbols

Centerpoint of the circle that is attached to the leader

Dimensions

Upper-left corner of the text box of the dimension

Geometric Tolerances

Upper-left corner of the symbol

Notes

Upper-left corner of the text box

Surface Finish Symbols

Lower-left point of symbol

TableAnnotation

Position of x,y,z determined by TableAnnotation::AnchorType

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.


所有的时间均为北京时间。 现在的时间是 03:22 AM.