Jump to content
  • Announcements

    • JimW

      The Future of Algorithmic Design   05/23/2017

      Natively available within Vectorworks software, Marionette delivers an algorithmic means to orchestrate and dictate design forms and customizations without needing to be a programmer.   Let the Marionette collaboration begin. Watch this video to learn how you can upload and share Marionette objects, nodes, and networks with your peers.
Hans Martin Kern

Rotating custom objects?

Recommended Posts



I'm trying to get my feet wet with creating Marionette nodes to support @Stephan Moenninghoff's  endeavours. As you would expect from an old fart I run into all kinds of problems, so please feel free to hit me with a rolled-up newspaper if my questions are way too basic.


My first "project" is a node creating any kind of custom object (code below). I tried both interiorcad's objects and stock VW plug-in objects. Works beautiful. 


If I route the custom object created by my node through the stock "Set 3D Rotation" Marionette node, the object is not rotated. I'm sure I'm missing something obvious here - any hints?







class Params(metaclass = Marionette.OrderedClass):
    this = Marionette.Node( "Create Custom Object" ) 
    this.SetDescription('Creates a custom object')

    #Input Ports
    universalName = Marionette.PortIn(0)
    universalName.SetDescription('The universal name of the custom object')
    position = Marionette.PortIn(0)    
    position.SetDescription('Insertion point of object instance')
    rotation = Marionette.PortIn(0)
    rotation.SetDescription('Rotation angle of object instance')
    showPropertiesDialog = Marionette.PortIn(0)
    showPropertiesDialog.SetDescription('Show the object''s properties dialog')
    #OIP Controls

    #Output Ports
    object = Marionette.PortOut('hObj')
    object.SetDescription('The resulting object instance')


def RunNode(self):
    universalName = self.Params.universalName.value
    position = self.Params.position.value
    rotation = self.Params.rotation.value
    showPropertiesDialog = self.Params.showPropertiesDialog.value
    customObject = vs.CreateCustomObjectN(universalName, position[0], position[1], rotation, showPropertiesDialog)
    self.Params.object.value = customObject

Share this post

Link to post



thanks for the hint. However, this leads to the inevitable question: How do rotate a custom-object without taking the current view into account? Coming from an SDK background, I would expect to set the custom object's 4x3 TransformMatrix and I'm done. 



Share this post

Link to post



you just mentioned the solution. I forgot that there is a transfrommatrix-node.

The Rotate3D node could be fixed by checking the type for PlugIn objects and

using TransfMatrix in case.  (@Marissa Farrel   :))

Edited by Patrick Winkler

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.