Jump to content
Developer Wiki and Function Reference Links ×

How can I reference my Marionette Object in a worksheet?


Recommended Posts

First, I'd just like to point out that I'm still somewhat new to VW and extremely new and self taught when it comes to the Marionette tool.


So, I created an underground catch basin with several in and out pipes for drainage purposes. Now, the way I put together the script is probably not the easiest or correct way to do it, but the object surprisingly works well in my mind. Now, I want to see if it's possible to get all of these dimensions referenced in a database worksheet. I've tried researching a little bit, and If I understand correctly, this process happens within the script level; I just don't really have a clue on how to do it.


I've attached the file I'm working on and a screenshot depicting my question. If there's anything I can provide or clarify further for anyone, please let me know!


Thanks in advance for any assistance!

- DM



VW Screenshot.png

Catch Basin_Marionette Object (Worksheet Practice).vwx

Link to comment

So the trick in this case is to edit the marionette network to take the parameter entered in the Shape Pane of the OIP and also store that value in a record.field for access by a worksheet.


That is a cool trick, but it would be much nicer is there was a way to directly access the marionette "fields" rather than having to manually do it with 3 or 4 extra tiles for each field you want to be able to access.

  • Like 2
Link to comment

The dialog box looks like it is from a worksheet script, not from the Marionette. And yes it is normal when you run worksheet scripts.


Any scripting language has the possibility of being malware.  The risk of something bad increased substantially when Python was added as a scripting option because it could much more easily access the entire file system than Vectorscript ever could.

Link to comment
  • 2 years later...
On 1/21/2020 at 3:04 PM, MRoth said:

Acess works without problems.


Mrnt Params.vwx


But I am not able to script a bidirectional function. Maybe someone knows how something like this could work.




I am using your WSS an it worked fine for String and Num Fields. Thanks for sharing!

I have no python experience so I am not able to fine-tune the WSS. Is it possible to make it work for bool fields? It seems that this is not working. 

With PopUp fields it gives the number of the selected item, ok that's how popups work, but is there an easy way to get the string instead of the number?

As the script searches in all marionette objects I get a dialog if the script finds a marionette that does not have the field. Is it possible to filter by the Marionette Name?


Thanks in advance



Question in German:




ich nutze dein Tabellenscript und soweit funktioniert es auch wunderbar, vielen Dank schonmal fürs Teilen!

Ich habe leider keine Erfahrung mit Python und kann daher selbst nicht das Skript optimieren. Ist es möglich dieses auch für boolsche Felder nutzbar zu machen? Mir scheint als würde dies nicht funktionieren. 

Bei PopUp Feldern gibt das Skript den Zahlenwert des ausgewählten Listeneintrags wieder, gibt es eine einfache Methode anstelle den Text wiederzugeben?

Das Script durchsucht alle Marionette Objekte, daher bekomme ich auch immer eine Meldung, wenn er ein Marionette Objekt findet, dass nicht das beschriebenen Feld besitzt, gibt es eine Möglichkeit diese Objekte im Skript zu filtern (zB nach Marionette Namen) oder die Meldung zu umgehen und die Felder einfach leer zu lassen?


Danke im Voraus


Grüße Flo


Link to comment

Diesmal ausnahmsweise ohne Übersetzung! 

This time exceptionally without translation!


Hallo Flo,

das braucht man nicht unbedingt im Script programmieren.

Es reicht sich einen cleveren Filter auszudenken, den man in der Tabelle nutzen kann.

Ich hab mal einen Teil der Marionette Objekte in eine andere Klasse gelegt (als Filter dann die Klasse genommen) Marionette Objektname hab ich probiert aber nicht ans laufen bekommen. 

Wenn das über Klassen nicht ausreicht müsste man das Script so umschreiben, das es erst prüft, ob die Werte existieren.


Ich persönlich finde aber die Lösung mit dem Script nicht so gut.

Einfacher wäre es eine Datenbank an die Marionette Objekte zu hängen und im Marionette Objekt die gewünschten "Parameter" direkt in die Datenbank zu schreiben

Dann kann man auch alles mögliche zusätzlich noch "erfassen" z.B. die Fläche des Rechtecks usw. 


Mit der Node "Parent Pio oder nun ("Marionette Objekt" in VW2023) bekommt man die Daten dann ans Marionette Objekt.

Ohne hängen die Daten am Rechteck im Marionette Objekt.

Gruß Markus  

Mrnt Params v2022.vwx

Link to comment

And here is the automatic translation, for all those who have the same problem again. Uncontrolled from DeepL.


Hello Flo,

you don't necessarily need to program this in the script.
It is enough to think of a clever filter that you can use in the table.
I have put a part of the Marionette objects in another class (as a filter then the class taken) Marionette object name I tried but did not get to run.
If this is not enough you have to rewrite the script to check if the values exist.

But I personally don't like the solution with the script.
It would be easier to attach a database to the puppet objects and to write the desired "parameters" in the puppet object directly into the database.
Then you can also "capture" everything possible in addition e.g. the area of the rectangle etc.
With the node "Parent Pio or now ("Marionette Object" in VW2023) you get the data to the Marionette Object.
Without it, the data are attached to the rectangle in the marionette object.


Greetings Markus

  • Like 2
Link to comment
  • 3 weeks later...

I am pretty sure, it should be possible by worksheet formula without script, is somebody long enough work on that Formula. I first attempt could be a hard-coded formula (one Formula for one parameter in one PIO)


=TEILSTRING(TEILSTRING('MarionetteObject2D'.'NodeDef_OIPControls', ',', 6), ':', 2)

While "Teilstring" is "SubString" and in Germany ';' must be used as delimiters instead of commas i guess. But it returns the Width of the Marionette Object. Also the reversed procedure should by possible by concat worksheet formulas. Never thought about this. 2 is the second parameter and 6 is the value.
Edit: Hm reversed procedure could be tricky by writing at all data from a formula on the object


Edited by DomC
Link to comment
  • 4 months later...

Hi all,


It's been a while but I'm playing with Marionette for Large Expo components.


It feel like two way Marionette functionality should be fairly easy programatically VW change right?

We do it for the LED tools, Lighting Devices, etc. Why can't we have a ='Marionette Object'.'My_Field_Name' call, it's just a database entry.


I think it's somewhat essential to the development of practical tools to be able to work in bi-directional worksheets - to be able to track multiple entity changes, edit object names/parameters, counts of fields, even booleans changes would make this much more powerful and sellable to client workflows.


I hope maybe @Marissa Farrell or one of your crew could look at the plausibility of this request for the Roadmap of this Tool.


Otherwise super enjoying it.





Edited by James Russell
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...