Basic Vectorworks Scripting

Vectorworks, a drafting program program I'd never encountered in school, seems to be the most popular alternative to Autodesk software in many of the professional settings I find myself in. As such, I've been using it more and more. Recently, the tasks have been very repetitive and tedious, perfect candidates for an automated workflow. I did some cusory research on the automation options, and found quite a few: Like Rhino's Grasshopper, it has a visual scripting interface called Marionette, which I thought would be a good place to start. I also discovered Vectorworks has an IDE built in, which is basically a little window to type out scripts. It looks like the main language supported for a while was "Vectorscript" which sounded way to specific for me to spend the time learning. Luckily, Python seems to have recently been added, which I (kinda) know.

Ok, I should walk that claim back a bit...one Codeacademy course doesn't make me fluent, and all of my Processing scripts rely on javascript. I'm only familiar enough with the concepts of coding to know what search terms to use, and that was enough to dive right in. A friend of mine actually got into this kind of automation with Revit, which has a far more complex API (toolbox for developers to interact with the software.) He pointed me towards some resources to not be totally lost. In that exploration, I learned that sometimes just getting the basics to work can be an accomplishment, so I seem to have found early success with Vectorworks!

Here's a script that is stupidly simple. It creates a Sheet Layer named "nikslayer" and then creates a view port on that layer. There may not be much there, but I'm pleased that it worked nonetheless!

nikslayer