Jump to content

Going into a Symbol's 2D Edit with Script

Recommended Posts

Good morning,


I am working on a PIO that can use a symbol as base geometry so that users can have further customization.  Is there a way to make the double-click behavior of the PIO edit the reference symbol?  I've added all of the requisite commands for the double-click special edit and to pull the handle of the referenced symbol definition, but can't find a command to open up the symbol editor for the symbol definition.  I tried EditObjectSpecial(symDefHand,4), but it keeps thinking I'm trying to edit the PIO instead.  If I change the editMode to 2 (Properties), it opens up the properties pane for the PIO, not the referenced symbol.


I did a few tests by playing around with the EditObjectSpecial procedure inside some temp scripts.  It worked perfectly for editing symbols but only if I had a symbol selected before running, and even then it would edit the selected symbol rather than the symbol definition passed into EditObjectSpecial.  If nothing is selected, the script doesn't do anything.  I can even pass in an empty handle as long as something is selected before running the script.  I've tried it in 2018, 2019, and 2020 with the same results.  Do we think that this is a bug or am I misreading its need for a passed handle?


For those playing along at home, my test script is as follows:





        symbolName:='Test Symbol 1';

        FOR i:=1 TO numSymbols DO
                IF(GetName(testHand)=symbolName) THEN symbolHand:=testHand;



I'm also down for trying something different to get to the symbol editor if anyone has any ideas.


- Jesse

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...