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

Replace Sketch Symbol retain reference to attached entity

Anonymous

Replace Sketch Symbol retain reference to attached entity

Anonymous
Not applicable

Hello,

 

I am writing a quick program that replaces a sketch symbol in a drawing. I am able to query the old symbol's position and use that however, the old symbol is attached to a leader note via geometry intent. How can I query the leader note from the old symbol so I can recreate the intent and have the new symbol attach to the same leader note? 

 

Any help appreciated. Let me know if more information is needed. 

-Chris

0 Likes
Reply
Accepted solutions (1)
335 Views
1 Reply
Reply (1)

Anonymous
Not applicable
Accepted solution

Figured it out. Posting for reference.

 

//returns the GeometryIntent of the node, in this case it is the node @ index 2 (this is where I was confused since I was using index @1 but this returns the first node of your leader which is not what is attached to the leader note mentioned above)

object intent = oldSymbol.Leader.AllNodes[2].AttachedEntity;

 

Once the object was returned I used that as a point in my new sketchsymbol to insert it and the new symbol is attached to the intent