Jesse Cogswell Posted July 6, 2020 Share Posted July 6, 2020 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: Quote PROCEDURE EditSymbol; VAR i:INTEGER; resList,numSymbols:LONGINT; symbolName:STRING; symbolHand,testHand:HANDLE; BEGIN symbolName:='Test Symbol 1'; resList:=BuildResourceList(16,0,'',numSymbols); FOR i:=1 TO numSymbols DO BEGIN testHand:=GetResourceFromList(resList,i); IF(GetName(testHand)=symbolName) THEN symbolHand:=testHand; END; Message(GetName(symbolHand)); EditObjectSpecial(symbolHand,4); END; Run(EditSymbol); I'm also down for trying something different to get to the symbol editor if anyone has any ideas. - Jesse Quote Link to comment
JBenghiat Posted July 6, 2020 Share Posted July 6, 2020 The following will edit the symbol at the conclusion of the script: SetObjectVariableInt(SymDefHandle, 9743, 0); You can also get a handle to a symbol definition simply with GetObject() instead of using the resource list. 2 Quote Link to comment
MullinRJ Posted July 6, 2020 Share Posted July 6, 2020 Hi Josh, In all the documentation I've got (limited as it may be), I've never seen an ObjVar in the 9000 range. Is there anything online with that info, or do tap into guru's in the factory? TIA, Raymond Quote Link to comment
JBenghiat Posted July 6, 2020 Share Posted July 6, 2020 @Raymond All the object variables >9000 I've learned from private discussions or posts to the list (and I think all from the listserv days). Quote Link to comment
MullinRJ Posted July 6, 2020 Share Posted July 6, 2020 Thanks, Josh. I do miss those days and the mailing lists. Raymond Quote Link to comment
Jesse Cogswell Posted July 6, 2020 Author Share Posted July 6, 2020 @JBenghiat Thank you for this, it certainly did the trick! The resource list was used in the larger code to populate a list box for selection and I didn't think to remove it when I scaled it down to test EditObjectSpecial. Quote Link to comment
Recommended Posts
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.