Depth of selected xref??

Depth of selected xref??

Anonymous
Not applicable
169 Views
0 Replies
Message 1 of 1

Depth of selected xref??

Anonymous
Not applicable
This "simple" little program is starting to drive me up the wall. I've got this little program (see code below) that allows the user to select an xref and then unloads it. The problem is, if the selected xref is attached to an xref that is attached to an xref, it unloads the parent xref and not the selected child. Is there an easy way of determining how deep an xref is?? -------------------------------------------------------------------------------- Public Sub PickXref() Dim Entity As AcadEntity Dim Point As Variant Dim BLK As AcadExternalReference On Error Resume Next Do ThisDrawing.Utility.GetEntity Entity, Point, "Select Xref: " If Err.Number <> 0 Then ThisDrawing.SendCommand "_vbaunload" & vbCr & """PickXref.dvb""" & vbCr Exit Do Else If TypeOf Entity Is AcadExternalReference Then Set BLK = Entity ThisDrawing.Blocks.Item(BLK.Name).Unload End If End If Loop End Sub -------------------------------------------------------------------------------- -- Matt W There are 3 kinds of people: Those who can count, and those who can't.
0 Likes
170 Views
0 Replies
Replies (0)