Jump to content
Developer Wiki and Function Reference Links ×

Unlock a Locked Plug-in


Recommended Posts

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?

Link to comment

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.

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.

Guest
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...