First of all I’m using MEP 2008.
Second: I have used the search button, but no luck!
I have a drawing, which has devices and wires in it. For these objects there are MVBlockRefs and LabelCurves showing different properties. Every device and wire has a custom property set. I am trying to create a macro, that hides all objects, that have a property in this property set equal to given. I got it working for the devices and wires, but the labels associated with them are the problem. As the labels doesn't have the property set, I need to know, how to get the referenced object.
My code scans the ThisDrawing.ModelSpace to acquire objects and labels:
For Each Item In ThisDrawing.ModelSpace
If ((Item.ObjectName = "AecbDbDevice") Or (Item.ObjectName = "AecbDbConduit") Or (Item.ObjectName = "AecbDbConduitFitting") Or (Item.ObjectName = "AecbDbWire") Or (Item.ObjectName = "AecDbMvBlockRef") Or (Item.ObjectName = "AecbDbLabelCurve")) Then
So I get the objects for the labels, but not the oject the label is referring to (device or wire). Thought property OwnerID will give out this information, but it refers to the Modelspace object.
Does anyone know, how to get the object, label is referring to?