Message 1 of 5
Not applicable
01-08-2013
02:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
Im making an array of all the sketchedsymboldefinitions in a drawing that are not used in the drawing as a sketchedsymbol
My problem is that i do not understand how to delete all the objects i have in my array at the end of the code
Dim oDoc As Drawingdocument = ThisDoc.Document Dim oSkSymDefs As SketchedSymbolDefinitions = oDoc.SketchedsymbolDefinitions Dim oSkSymDef As SketchedSymbolDefinition Dim oSheets As Sheets = oDoc.Sheets Dim oSheet As Sheet Dim oSkSymb As SketchedSymbol Dim MyArrayList As New ArrayList
'checking each definition for occurence in the drawing For Each oSkSymDef In oSkSymDefs
'checking each sheet For Each oSheet In oSheets Dim oSkSymbs As SketchedSymbols = oSheet.SketchedSymbols
'checking each sketched symbol per sheet For Each oSkSymb In oSkSymbs
'If the sketchname is found and not previously found then add to array If oSkSymDef.Name = oSkSymb.Name And Not MyArrayList.Contains(oSkSymDef) Then MyArrayList.Add(oSkSymDef) End If Next Next Next
So I got my array with all the objects to be deleted. But how to delete???
I also believe this code could be a bit more effecient.
So if anyone can help im very grateful
Thx in advance,
Arnold
Solved! Go to Solution.