Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
mfoster9TD82
in reply to: C_Haines_ENG

You may need to get the placement and sketch symbol definition from the existing sketch symbol, delete it and place another one using SketchedSymbols.Add(). It doesn't really looks like you can remove leaders from sketch symbols, but you can add them...


Edit:

I was mistaken. After fooling around with it more, you can delete the all the Nodes in the leader of each sketch symbol:

 

Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim oSheet As Sheet = oDrawDoc.ActiveSheet
Dim oSketchedSymbols As SketchedSymbols = oSheet.SketchedSymbols

For Each oItem As SketchedSymbol In oSketchedSymbols
		
	If Not oItem.Leader Is Nothing AndAlso Not oItem.Leader.AllNodes Is Nothing Then
		While Not oItem.Leader.AllNodes Is Nothing AndAlso oItem.Leader.AllNodes.Count > 0 
			oItem.Leader.AllNodes(1).Delete
		End While
	End If
Next

 

edit2: code fix