Retrieve the Attachment Line Count

Hello everyone,

 

I would like to know if it was possible to get the number of attachment lines in an annotation?

 

(Solidworks 2013)

 

Thank you!

1 Like

Hello

A priori it is possible with a macro with the statement:

 

GetAttachedEntityCount3 Method (IAnnotation)


Gets the number of entities to which this annotation is attached.

 

http://help.solidworks.com/2012/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IAnnotation~GetAttachedEntityCount3.html

 

 

4 Likes

Yes by API

 

Look at IAnnotation::GetLeaderCount

 

 

8 Likes

In fact we can get the information by both methods, the one given by Lucas and myself

 

A returns the attachment number =>  GetLeaderCount

the other the number of entities where the annotation => GetAttachedEntityCount3 is attached

which in most cases and the same 

9 Likes

Great thank you!