Jump to content
Developer Wiki and Function Reference Links ×

Writing nodes


Recommended Posts

Hi, I want to venture into writing my own nodes and the main issue I have at present is linking into the vectorworks program to get things.

Say I want to get the top right of a polygon, yes there is a node and I see the code, but I want to understand how it links so I can play with my own coding to explore different things.


Edited by Alan Woodwell
Link to comment
  • Marionette Maven


I believe you're aware of the Developer Wiki, which contains our VectorScript API and is often a good place to start looking for the functions you may need.

Another way you could do this, if you have a Marionette network that you'd like to consolidate into a singular node, it's pretty easy to just grab the pieces of the code within the nodes that you'd need. I've gotten into the habit of first writing what I want using the standard Marionette node set, and then I dissect the nodes to find the code snippets required to consolidate it.

There are still functions on the wiki that we haven't introduced to Marionette, though, but most functions have an example posted on how to use them on the wiki, which could also be of use.

Also, since we use Python 3.3 as the coding basis of Marionette, it may also help to familiarize yourself with some standard Python practices. I've always found this to be a useful resource. You can likely skip to Chapter 3, since within Vectorworks it's not really necessary to use an interpreter. (If you'd like to use one for a better understanding of Python overall, that's also fine.)

I actually had never even touched Python before using Marionette, so Marionette has essentially been my Python teacher :)

Please let me know if you get stuck or need guidance!

Edited by MarissaF
Link to comment


Thanks, that is the exact reference I have been working through while on holidays on my iPad. I now understand the principle of slices, list, defining functions etc which will help me understand the current list of nodes as prevously they were all double Dutch.

It would be nice to see inside an existing OIP like Windows because I want to see how it all works. If I can see how the door frame is made up in the window OIP I can hopefully build my own with marionette, as an example.

Maybe it's simply a matter of building it all from scratch the way we currently do with all the pieces at hand and manipulating them.

More food for my subconscious to mull over.


It's a bit like the info Michael posted, where did this info come from?

Seems to pull specific parts of the program.

Edited by Alan Woodwell
Link to comment
  • Marionette Maven

I feel like in most cases, users aren't permitted to see the programming behind PIOs, this allows the creator to keep the complexity of the object hidden from the user (so they can't reproduce it and share it with others who don't have it by default).

I've found that taking an object and creating a few viewports (say top, front, and right views) and dimensioning them helps to establish the relationships between different pieces. Then you can take those dimensions and decide which ones you'd want the user to be able to change, and after that you can begin defining it on a script level, either by using Marionette or just a Python script.

Also, many plug ins within VectorWorks have been written using the SDK rather than VectorScript/python, and some functions haven't been properly brought into the VectorScript API, which is also a limiting factor in some cases.

We're working to identify functions that would be useful in the VectorScript API, that aren't already there, and hope to include them in the future.

In any case, I hope to produce a video series in the near future on some practices for programming object creation in 3 dimensions/thinking in 3D space. My primary tool will likely be Marionette, but I think I may dive into some Python scripting as well.

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.

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