Jump to content
Developer Wiki and Function Reference Links ×

Default and Custom Value input in the Object Info Palete

Dishav Vasudev

Recommended Posts


I'm new to using Marionette Tool in Vectorworks and am finding it very useful for simple parametric object creation. 


I'd appreciate to know if there is a way to set the marionette-object with pre-defined values which can be selected in a drop-down selection in the object info palette?

And, to take the above further, it is also possible to add a 'Custom' option where the user can add their own value and the marionette object will follow?


To visualise this, imagine a rectangle with 'Width' and 'Height' defined and user can select it from the Object Info drop down but those 'standard' value may not be suitable (due to real-life use) and needs to change that rectangle to a project based value, therefore also a custom option in the drop-down where the user can specify 'Width' and 'Height'.


I don't wish for someone to make the network for me, I'd like to learn and build it myself


Thank you in advance.

Link to comment

A simple way to accept custom inputs in addition to the default values is to add a "Use custom value" entry to the dropdown. In addition, you need an input field in which you can do the custom input. Now you can choose with a simple "if" whether the value of the dropdown or the custom input should be used.



I know you don't want to see a ready-made solution, but with a picture, it's easier to understand.



  • Like 1
Link to comment

To customize the default dropdown node "Popup", you have to remove the first line of code and then change the elements of the list in line 13.

The example below shows a dropdown with the elements car, train and plane.

class Params(metaclass = Marionette.OrderedClass):
	this = Marionette.Node( 'Popup' )	
	this.SetDescription('This node shows a dropdown with the elements car, train and plane. The values returned by this node will be integers based on your selection starting with 0 for the first option and increasing by 1 for consecutive options.')
	#Input Ports
	#OIP Controls
	input = Marionette.OIPControl( 'Popup', Marionette.WidgetType.Popup, 0, ['Car', 'Train', 'Plane'])
    #continue with the standard code

Remember that this node outputs integer values. so in the example above I added an Any-node with the selection list and a GetItem-node.

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