I need to get the layer of the BOMs in my drawing and then run some code if the Bom is on the English Layer. I can't seem to find how to get the layer. Here is the code where I get the name of the BOMs.
'Get BOM name
Do While Not swFeat Is Nothing
If "BomFeat" = swFeat.GetTypeName Then
Set swbomfeat = swFeat.GetSpecificFeature2
Set swBOM = swbomfeat.GetFeature
sBOMname = swBOM.Name
Set swFeat = swFeat.GetNextFeature
Thanks in advance.
You're not very far.You should get the associated Annotation object and eventually the layer name using the Layer property from the Annotation object. Try this:
swBOM.GetAnnotation.Layer = "Your Layer Name"
Retrieving data ...