Message 1 of 4
Explode method copies objects?
Not applicable
10-05-2001
04:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I have the following code that I am using to explode LWpolylines. If I run
the code and check the drawing, I find that the original polyline is
exploded (now seperate line segments) and a new duplicate polyline appears
in the exact same spot as the original. Am I doing something wrong or doing
something that would cause it to "copy" the polyline or is this a
function/problem with the explode method?
Public Sub DrawingScrub()
Dim Response As Variant
Dim Ent As AcadEntity
Dim objLwPoly As AcadLWPolyline
Dim objBlock As AcadBlockReference
Response = MsgBox("This macro will explode ALL objects and place ALL objects
on the 0 (zero) layer." & _
" Do you wish to continue?", vbYesNo, "Drawing Scrub")
If Response = vbYes Then
For Each Ent In ThisDrawing.ModelSpace
If TypeOf Ent Is AcadLWPolyline Then
Set objLwPoly = Ent
objLwPoly.Explode
End If
Next Ent
Else
Exit Sub
End If
End Sub
TIA,
Rob
I have the following code that I am using to explode LWpolylines. If I run
the code and check the drawing, I find that the original polyline is
exploded (now seperate line segments) and a new duplicate polyline appears
in the exact same spot as the original. Am I doing something wrong or doing
something that would cause it to "copy" the polyline or is this a
function/problem with the explode method?
Public Sub DrawingScrub()
Dim Response As Variant
Dim Ent As AcadEntity
Dim objLwPoly As AcadLWPolyline
Dim objBlock As AcadBlockReference
Response = MsgBox("This macro will explode ALL objects and place ALL objects
on the 0 (zero) layer." & _
" Do you wish to continue?", vbYesNo, "Drawing Scrub")
If Response = vbYes Then
For Each Ent In ThisDrawing.ModelSpace
If TypeOf Ent Is AcadLWPolyline Then
Set objLwPoly = Ent
objLwPoly.Explode
End If
Next Ent
Else
Exit Sub
End If
End Sub
TIA,
Rob