Jump to content
Developer Wiki and Function Reference Links ×

Parametre list input


Recommended Posts

Is there a way to create a parametre list that works for multiple marionette objects?
I want to have a couple of marionette objects for which I can use the same input by selecting a=20 and b=40 for example.
And that multiple marionette objects respond to that.

  • Like 1
Link to comment

but how to drive any value into given marionettes with input variables?


Ok i know how to place a symbol, but how u put in the variables into all by marionette placed symbols?


I can imagine, that some kind of "get input variables" into a list and then put the global variables of your main marionette into the placed symbols?

Link to comment

As I understand, you want something like global variables for the PIOs on the Document. Like Title Block Project Data.
There are several possibilities. I think it depends on what you can handle yourself. 3 Examples of Strategies:

1. You could get the values from a Record handle (the record definition itself not from an Object > It takes the default value). So you had a central control over those values. 
2. You could push the values (with a Dialog) directly to the Marionette PIOs
3. Take the value from a worksheet
This depends how your Marionette-Code is designed.

I guess SimA - Method (Method 1?) would be the best option.

To the second Methode. Maybe this is the hardest one because changing the OIP of Marionette is not as simple like with Standard PIOs. There is an Example in the Gallery to make this or you could code A dialog-Window Enter the Value and Push them on your Objects. For myself I use that method to backup values from the marionette on a record. So the script is updated I am able to pull the values if necessary from that record.

Code something like this:

import json

recName = 'MarionetteObject3D'
#recName = 'MarionetteObject2D'# Check, the Marionette Rec-Name for your Marionette PIOs
fldName = 'NodeDef_OIPControls'

#collect Objects
objs = []
def getObj(h):
criteria = "(NOTINDLVP & NOTINREFDLVP & (C='MarionetteObjects'))"    
vs.ForEachObject(getObj, criteria)

OIP_Name = 'Mauerlicht' #Name of the Parameter
OIP_value = 1200 #value of the Parameter

for obj in objs:    
    sOld = vs.GetRField(obj, recName, fldName)  
    j = json.loads(sOld)
    for OIP_field in j['data']:
        name = OIP_field['varName']
        if OIP_Name in name:
            value = OIP_field['value']
            OIP_field['value'] = OIP_value

    vs.SetRField(obj, recName, fldName, json.dumps(j))


Edited by DomC
Link to comment

I guess you could create any master-object which is connectet to a database an name it. in your marionette you get this object by name an gets its database entrys.


If your master-object is a symbol with symbol-text you have a "Master-Table" or something like that.


Edited by Gregi
Link to comment
On 10/27/2021 at 2:47 PM, KingChaos said:

sounds like he wants to drive a lot of marionettes having the same input variables with one parameter in the file were he wants to place them.


This is exactly what I want. I've used Top Solid Wood before (a different drawing programme) they use a parameter list to control al these parameters. This way it's easy to adjust the objects.

You have a base object which can be adjusted in a couple directions by changing the parameters.


What DomC suggests is probably going to work.

I'm not that good at scripting, but I'll give it a try.

Thanks already!

  • Like 1
Link to comment



maybe i am too stupid but nothin happened ^^ except crashing VW a few times.



The debug tells me "True" so VW was succesful to placing my value into the database of the 3D-Cabinet, but the Cabinet is still in original dimension.


It named the symbol in the group exactly what i wanted, but something is not right, i dont get what it is.



Symbol mit Parameters einfuegen_V2.vwx

Link to comment

The Field name of "Gesamt Breite" ist 'Width' not "Breite". If you change that, you will get the right object.
If you set a name of the object, you change the name on the object info on the very buttom. Not the Cabinet Name. The Cabinet Name ist generated by a higher "act of nature" we are not able to write that Name field with a Script. 
Also ungroup I would not use. Because your Symbol is inserted as a PIO. The group around every marionette-created geometry you cant eliminate with the ungroup node. I think this could be changed with the node itself "linkedGeometry"

This here, created the group:

Edited by DomC
Link to comment


Thanks Dom, i have to check.


Ah now it works thanks.


Additional question, "is it possible, to have some variables not beeing "named" by condition or otherwise deleted out of hte oip?"





If my POlyline has 4 segments, i would like to have the inputvariables height and Width of the 5. and 6. Object are not beeing shown in the oip.image.png.fe984559de45b9aeb12119252abf4ada.png




Link to comment

@DomC Hi and thx a lot so far.



its developing.



is there any Dropdown possibility for choosing the different symbols like the "get texture" nude?

I would place my symbols in a specific folder (Interior) in the ressource manager and like to have a pulldown with all symbols existing there.



The Rest is working fine, except:

- textformatting the measuretext (i have no chance for center aligne my text) -> should be red and "right aligned"

- textformatting the assemblyname-text (RB_01 .... RB_06) should be green and left aligned

- making an object node out of it VW crashed


BR and thx for your help.


Maybe u have some solutions for there problems.







Namensinputmit Aktivierung.vwx

Link to comment

@DomCnext problem is, if i place the same symbol-cabinet multiple times, vw wont rename it all cabinets having the same name f.E. "Korpusmöbel-53".


That will result, if i ungroup the cabinets, that all the parts 3D have not a single databasenetry.


Only the first one placed by marionette has all entries in all databases.



the others are not connected to any db.


so if i will later on use those parts i HAVE to manipulate the name, or make VW renaming them.




damn, it was such a good plan.

Link to comment

@KingChaos Ich kann den Knoten auch nicht in ein Objekt umwandeln --> Absturz.


Ist es möglich, dass die Kontrollgeometrie Schwierigkeiten macht?

Habe vor Kurzem eine Kontur in eine Gruppe verfrachtet und anschliessend den Gruppennamen für die Erzeugung des Objekts verwendet.

So kannst du übrigens auch mehrere Geometrie gleichzeitig (in der Gruppe) verarbeiten.



  • Like 1
Link to comment



what is the reason for that cabinettool?

Do you have the interiorcad?


i got no useful application for not interiorcad objects cabinets because we have to cnc them.

therefore all stuff i place has to be an interiorcad part 3D or cabinet 3D with 3D-parts.


Maybe i misunderstood your english post but i am struggling with naming such cabinets out of the XG generator.


This objects are not nameable by marionette, DomC told me.

If that is true it is a "death blow" for this solution.



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