-
You should see how much lisp it takes to find the boundry of an existing hatch. VBA can't touch it as far as I can tell at this time, it will only work on DXF's (which is what I read and write). I still looking for a start on finding the boundry.
Anyway I had a brain cramp and was subtracting instead of adding, sorry for the problems.
[VBA]
Sub DelDimSSet()
Dim oDim As AcadDimension
Dim mDelDimSset As AcadSelectionSet
Dim mI As Integer, mTmp() As AcadEntity
Dim mCntr As Long
ReDim mTmp(30)
Set mDelDimSset = ThisDrawing.SelectionSets.Add("DimDelete")
For mI = ThisDrawing.ActiveSelectionSet.Count - 1 To 0 Step -1
If InStr(1, ThisDrawing.ActiveSelectionSet(mI).ObjectName, "Dimension") > 0 Then
Set mTmp(mCntr) = ThisDrawing.ActiveSelectionSet.Item(mI)
mCntr = mCntr + 1
If UBound(mTmp) < mCntr Then
' the below line was subtracting instead of adding
ReDim Preserve mTmp(mCntr)
End If
End If
Next
ReDim Preserve mTmp(mCntr - 1)
mDelDimSset.AddItems mTmp
mDelDimSset.Erase
mDelDimSset.Delete
ThisDrawing.Regen acActiveViewport
End Sub
[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules