Is there a way to use SelectByID2 with ONLY the name of the feature / annotation?
In the macro I'm writing I don't know if an annotation is a Dimension, GTOL, or Note. I also do not know where the annotation is. Usually i use this code:
boolStatus = false
If Not boolStatus Then boolStatus = swModel.Extension.SelectByID2(NewLink, "DIMENSION", 0, 0, 0, False, 0, Nothing, 0) : If boolStatus Then MyAnnotationType = "DIMENSION"
If Not boolStatus Then boolStatus = swModel.Extension.SelectByID2(NewLink, "GTOL", 0, 0, 0, False, 0, Nothing, 0) : If boolStatus Then MyAnnotationType = "GTOL"
If Not boolStatus Then boolStatus = swModel.Extension.SelectByID2(NewLink, "NOTE", 0, 0, 0, False, 0, Nothing, 0) : If boolStatus Then MyAnnotationType = "NOTE"
However i would like to condense this down to a single "SelectByID2" line.
Is there anyway to do this, or are you required to have either the type or the location of the annotation in order to select it? And yes i have tried it by passing an empty string to the type field.
Thanks
SolidworksApi macros