Jump to content

Encrypting Python Scripts with external libraries

Recommended Posts



I have been working on a few Python Scripts that use third party libraries - for example BeautifulSoup4.

I intend to Encryption this script into a vsm plugin so that the external libraries are bound to it and can be used on other installations of Vectorworks.


I realised that the Encryption/Obfuscation method through Vectorworks is not able to bind the external packages into the vsm file:

I've included the path to these libraries in the Script Options and I am using the steps indicated by Vlado in this post for the related xml file.




<?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- This file defines how the corresponding script plug-in should be packaged--><Plugin>

Can any one advise on how to resolve this?

Thank you in advance.



Share this post

Link to post

Is /7_Vectorworks 2018 your VW user folder?  It’s an unusual name, so if not, you need to add a path attribute to the xml. 


For this xml, the .vsm file would be in the /7_Vectorworks 2018/plug-ins folder, along with the xml file. 


You’re not including the main.py file if you have one — any .py files in /code that you use also need to be in the xml file. The only reason not to include them is if your main code is all directly in the vsm. I.e. if you open the vsm in the plug-in manager’s script editor and call import bs4 from there

Share this post

Link to post

Hi Joshua, 


thank you for your response.

Yes my user folder was set to /7_Vectorworks 2017, and I keeping the xml in the Plug-in folder within that.

For clarity - I have know reverted back to the standard path and still keeping the xml next to the vsm.


Indeed, I don't have a 'main.py' because all my code is in the vsm.


The Encryption works with no errors, but when I run the Encrypted vsm on a different installation of Vectorworks I get the error:
ImportError: No module named 'bs4'

(bs4 module is the BeautifulSoup module) 

My python call in the script is: 

from bs4 import BeautifulSoup

So something is not working in actually binding the package with the vsm file..

any idea?

here is a screenshot of my Plug-in Folder  with the Development/code and Development/bs4  folders.





thank you



Share this post

Link to post

That's the case:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- This file defines how the corresponding script plug-in should be packaged--><Plugin>

Share this post

Link to post

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.


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.

  • Create New...