Welding Symbol

Welding Symbol

JMGunnar
Collaborator Collaborator
406 Views
1 Reply
Message 1 of 2

Welding Symbol

JMGunnar
Collaborator
Collaborator

I know about that weldsymbol not have Api 

but is thera any options too collect weldsymbol too reattacment again 

 

Best Regards Johan 

 

 

Auto reattech Annoation.png

 

 

like 

Sub Main()

    ' Set a reference to the active drawing document
    Dim oDoc As DrawingDocument
    oDoc = ThisDoc.Document 'ThisServer.ActiveDocument
    
    ' Set a reference to the active sheet
	Dim oSheet As Sheet
    oSheet = oDoc.ActiveSheet
   
    ' Iterate over all Weldingsymbol in the drawing
    ' and delete unattached (sick) dimensions.
   Dim oSelectset As SelectSet
	   oSelectset = oDoc.SelectSet
       oSelectset.Clear
	Dim oTG As TransientObjects
	    oTG = ThisApplication.TransientObjects
	 Dim oLeaderCollection As ObjectCollection
	    oLeaderCollection = oTG.CreateObjectCollection		
	
	
	Dim oLeaderNote As LeaderNote 
	
	For Each oLeaderNote In oSheet.DrawingNotes.LeaderNotes
		 	 oLeaderCollection.Add(oLeaderNote)
	Next
	
	         
   	oSelectset.SelectMultiple(oLeaderCollection)
	'ThisApplication.CommandManager.ControlDefinitions.Item("DLxAnnoReconnectCmd").Execute
	ThisApplication.CommandManager.ControlDefinitions.Item("DLxAutoReattachSickAnnotationsCmd").Execute
    	
    oSelectset.Clear
    	
		
	End Sub

 

 

 

0 Likes
407 Views
1 Reply
Reply (1)
Message 2 of 2

JMGunnar
Collaborator
Collaborator

Have any do some SelectSet code that use 

custom filter  

is any options i find too get only Weldsymbol..

 

Johan

 

 Dim oSelectset As SelectSet
	   oSelectset = oDoc.SelectSet
            oSelectset.Clear
		 Dim oTG As TransientObjects
            oTG = ThisApplication.TransientObjects
            Dim oLeaderCollection As ObjectCollection
            oLeaderCollection = oTG.CreateObjectCollection

 

 

 

Customfilter.PNG

0 Likes