VvierA Posted February 19, 2022 Share Posted February 19, 2022 Hi there, I need to convert one of my old Vectorscripts to Python to convert it to a Marionette node. Since I have no experience in Phyton Scripting I was wondering if there are any tipps on how to set this project up. I already found some very nice Phyton tutorials on the internet but not so much that refers particulary to VW. Any hints appreciated, cheers VVierA Quote Link to comment
Pat Stanford Posted February 19, 2022 Share Posted February 19, 2022 If you don't need extra libraries, then VW has a complete Python interpreter. Just use the Vectorscript editor and set it to Python at the top. Since you are converting from VS, this should be reasonable. If your script is really long you might want to get a more involved development environment. 1 Quote Link to comment
Peter Vandewalle Posted February 19, 2022 Share Posted February 19, 2022 Marionette nodes need to be coded inside the node. No further interface needed. Are you sure you need to create Marionette nodes? Or do you need to script just Python. For Python scripting we use Eclipse. 1 Quote Link to comment
twk Posted February 20, 2022 Share Posted February 20, 2022 As @Pat Stanford suggested, the vectorscript editor should be adequate for marionette editing. I personally use PyCharm. Much more robust, for actual plugin development, version control, managing external libraries as well. They have Windows and Mac versions as well https://www.jetbrains.com/pycharm/download/#section=windows 1 Quote Link to comment
VvierA Posted February 20, 2022 Author Share Posted February 20, 2022 9 hours ago, Peter Vandewalle said: Marionette nodes need to be coded inside the node. No further interface needed. Are you sure you need to create Marionette nodes? Or do you need to script just Python. For Python scripting we use Eclipse. Yes, I think I need a Marionette node. Right now I have a Vectorscript Menu Command that retrieves some information like the current date and writes it do a record format of an activated symbol. The record format is linked to some text within the symbol. Now I want to convert the symbol to a marionette object. Since I haven't found any 'retrieve current date' node and there seems to be no way to call Vectorscript menu commands from within a marionette network, I'd like to create the 'retrieve date'-Marionette node. 2 hours ago, twk said: As @Pat Stanford suggested, the vectorscript editor should be adequate for marionette editing. I personally use PyCharm. Much more robust, for actual plugin development, version control, managing external libraries as well. They have Windows and Mac versions as well https://www.jetbrains.com/pycharm/download/#section=windows PyCharm looks good. I use it already for a Phyton tutorial I found on Youtube. But I don't understand yet how to use PyCharm to write Phyton Scripts for Vectorworks? How does PyCharm know the special functions and calls that exist in Vectorworks? How can I test Phyton scripts with Vectorworks functions from within PyCharm? Quote Link to comment
Popular Post twk Posted February 20, 2022 Popular Post Share Posted February 20, 2022 ForumHelp_PycharmInstallVW.mp4 6 Quote Link to comment
VvierA Posted February 20, 2022 Author Share Posted February 20, 2022 7 minutes ago, twk said: ForumHelp_PycharmInstallVW.mp4 9.87 MB · 0 downloads Fantastic! Thank you very much. I will try that... Quote Link to comment
VvierA Posted February 20, 2022 Author Share Posted February 20, 2022 19 minutes ago, twk said: ForumHelp_PycharmInstallVW.mp4 9.87 MB · 0 downloads Sorry for asking once again... I use a Mac and I cannot find the Python interpreter that comes with the VW installation...? Quote Link to comment
twk Posted February 20, 2022 Share Posted February 20, 2022 (edited) Unfortunately I am not a Mac user. In windows it's found in the installation location of vectorworks, under: # C:\Program Files\Vectorworks 2021 NZE\Python38 Edited February 20, 2022 by twk 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.