exploding plines routine

Hi friends,
This is my first attempt to write a vba code.
My aim was to select all polylines among all selection
and explode them.That worked fine!.But all the lines i
obtained were duplicates.Can anyone help me with this
problem? I would be very thankful.
Here goes the code..............
-----------------------------------------------------------------
Sub exp()
Dim Mypline As AcadLWPolyline
Dim fType(0) As Integer, fData(0)
Set adSS = ThisDrawing.SelectionSets.Add("adSS")
If Err Then Set adSS = ThisDrawing.SelectionSets.Add("adSS")
adSS.Clear
fType(0) = 0: fData(0) = "LWPOLYLINE"
adSS.Select acSelectionSetAll, , , fType, fData
For Each Mypline In adSS
Mypline.Explode
Next Mypline
ThisDrawing.Application.Update
adSS.Clear
End Sub
------------------------------------------------------------------
Reply to
vinayan
Loading thread data ...
The Explode method does not remove the original object. Use MyPline.Delete after you explode it.
Reply to
Jeff

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.