Jump to content

Recommended Posts

I created a plugin object using python. The main code was pasted into the script editor via the plugin manager.   I compiled the script and the plugin item works as it should.  Now I would like to lock the script.

I'm on a mac and recently made the jump from Vectorworks 2008 to 2016.  In the past when creating a vector script I could lock it  by holding down 'command' + 'option' + 'shift' + 'caps lock'  (it was important that all external files had the extension .px)

 

Now i'm in 2016 and scripting with Python.  I only have 1 other file in addition to "import vs", which is,  "import shapes" when i compile my script (shapes.py).  It finds this file via the scripts options/environment paths.  How do I go about locking or encrypting this plugin object?

 

also, I do have a __init__.py file included in the folder that contains shapes.py

 

Share this post


Link to post

We've had a few discussions on the topic.  In order to bundle python files in an encrypted script, you create an XML file telling the script engine where to find your imported files.  Start with the posts here: 

-Josh

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×