Jump to content
Developer Wiki and Function Reference Links Read more... ×
VvierA

Possible to convert a Marionette object into a PIO?

Recommended Posts

Hi guys,

I created a Marionette object and I'd like to convert to a custom plugin.

Is there a simple way to do it?

Or is it maybe possible to just copy the code of the marionette object and create a custom plugin object manually?

 

Thanks in advance

VvierA

Share this post


Link to post

Marionette Objects are the closest thing to a PIO that a Marionette script can be automatically converted to.

 

You can export the Python script for the Marionette Object with the context menu command and create a PIO from it with the Plug In Manager, but the code in there is pretty ugly looking and nearly impossible to read to edit later (also not optimized at all), though it might be what you'll need to do to accomplish this. (I'm not positive if you first need to convert back to a wrapper node prior to exporting the Python script.)

Share this post


Link to post

Thank you very much for the quick response, Marissa.

I learn that trying to 'transfer' the code that was generated by Marionette to a PIO might not be the best idea.

Instead - what do you think is the easiest way to make the Marionette Object available in every Vectorworks document as a kind of tool?

I'm wondering because I didn't find a way to share the Marionette object other than opening the VW document where it is placed and transfer it by copy and paste to another drawing....

Share this post


Link to post

You can save the Marionette Object as a Red Symbol in your Resource Manager which would allow you to insert it into other documents (you could save this file to your user folder or to your Favorite Files for easy access)
When creating the symbol, make sure "Convert to Plug In" is checked in the Symbol Options window to make it a red symbol instead of a black symbol.

Share this post


Link to post

Thanks you so much Marissa. The symbol works fine.

 

Sorry to bother you again, but I have so many questions...

I'd like to implement a PopUP Menu with some options in the OIP of my Marionette Object.

I already found the Popup Menu node. It offers three choices, but there is no direct access to edit the number or the names of the choices.

Do I need to edit the code of the node to configure it for my purposes or is there another way?

 

Share this post


Link to post

Yep!

 

So the Popup List node is a template for users to edit to make their own lists.

You can add/change the "Choice 1, Choice 2, Choice 3" and add more items to that list as well. The outputs will start at 0, so if Choice 1 is selected, 0 will be the output.

Does this help?

Share this post


Link to post

Thank you. So I understand, that I need to edit the python code of the node?

I tried to do this to make changes, but it doesn't work. When I made the changes and closed the python script window it tells me 'You have made changes to the text in a read only referenced file....'. I don't know how to duplicate the node template and how to remove the write protection so that I could edit it.

Maybe I got something wrong?

 

 

Bildschirmfoto 2019-01-30 um 18.41.15.png

Share this post


Link to post

Ah - I forgot to mention the step where you delete the line at the very top that starts with #COMMAND. If you delete that entire first line, the script/node will update.

Share this post


Link to post

Oh and another issue...

If I just use the sample with the three choices and I convert my network into a Marionette object the three sample choices do not appear in the OIP.

Is this, because it's just a sample and does the popup up list appear automatically if I manage to change the sample entries?

Share this post


Link to post

Thank you - the trick with deleting the first line worked. But the popup list still doesn't appear in the OIP.

 

Share this post


Link to post

If you name the Popup List node in the OIP with a name, it should appear in the OIP when converted to a Marionette Object.

Share this post


Link to post

That's it - thank you again, Marissa. Sorry to bother you with such simple questions. Your help is very appreciated.

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.

×