PeterT Posted May 2, 2017 Share Posted May 2, 2017 Hi, I have an event enabled plug-in that is my sheet number. I double click it and a dialog opens up to populate all my sheet numbers. I have always had the sheet number locked so that when I double click it it does not accidentally move. Several versions ago, It would open the dialog even though it was locked, but more recently, it no longer opens, and gives me the locked object message. Now I have to unlock the sheet number, double click it to update the sheet numbers then close the dialog and re-lock the sheet number. This sort of removes the protection I had of not accidentally moving the sheet number when editing. The question I have is whether there is anyway that I can write code into the plug-in such that when I double click the locked plugin it will unlock to open the dialog, then re-lock when I close the dialog. I tried adding the UnLckObjs and LckObjs calls in the script but it did not work. Is there any way to do this? Quote Link to comment
Pat Stanford Posted May 3, 2017 Share Posted May 3, 2017 The next thing I would try would be: SetObjectVariableBoolean(HandleToPIO, 700,True/False) This is defined in the Vectorscript Appendix as Object Is Locked. It looks like you can use that to lock or unlock by a handle to the object. Interesting idea. Please let us know how it works out. 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.