Dmoozak Posted January 15, 2020 Share Posted January 15, 2020 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 Catch Basin_Marionette Object (Worksheet Practice).vwx Quote Link to comment
m.graf Posted January 16, 2020 Share Posted January 16, 2020 (edited) @Dmoozak take a look in this file, In the "Marionette Object" i have connect one Parameter "CB-Outer Radius" greatings C_B_(Worksheet Practice).vwx Edited January 16, 2020 by m.graf 1 Quote Link to comment
Dmoozak Posted January 16, 2020 Author Share Posted January 16, 2020 @m.graf Exactly what I was after, thanks for the help! Quote Link to comment
Pat Stanford Posted January 16, 2020 Share Posted January 16, 2020 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. 2 Quote Link to comment
M.Graf TH-OWL Posted January 17, 2020 Share Posted January 17, 2020 @Pat Stanford DomC has built a node do get the OIP Parameter ("hidden in json load"). I have also try to get the OIP Parameter, because I wanted to change the Parameter for every Marionette Object directly in the Worksheet. 3 Days "try an error" - with no result! 😞 This Funktion is on my wishlist since 2018... Greatings M.Graf 1 Quote Link to comment
Pat Stanford Posted January 18, 2020 Share Posted January 18, 2020 That is a very nice function, but I would still like to be able to access and edit Marionette data directly from a worksheet. Quote Link to comment
MRoth Posted January 21, 2020 Share Posted January 21, 2020 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. 1 Quote Link to comment
m.graf Posted January 21, 2020 Share Posted January 21, 2020 @MRoth very nice! without VW scripting / only with Marionette also works in one direction. The fieldvalue is changeable... no impact. Is the Script warning normal? I don't see it before. Is it possible to create or get malware by Marionette / Phyton? Simple_Test_OIP.vwx Quote Link to comment
Pat Stanford Posted January 21, 2020 Share Posted January 21, 2020 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. Quote Link to comment
FKA Posted November 12, 2022 Share Posted November 12, 2022 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. Hello, 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 Flo Question in German: Hallo, 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 Quote Link to comment
m.graf Posted November 13, 2022 Share Posted November 13, 2022 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. Tip: 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 Quote Link to comment
MRoth Posted November 14, 2022 Share Posted November 14, 2022 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. Tip: 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 2 Quote Link to comment
DomC Posted November 29, 2022 Share Posted November 29, 2022 (edited) Hi 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 November 29, 2022 by DomC Quote Link to comment
James Russell Posted April 4, 2023 Share Posted April 4, 2023 (edited) 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. Cheers, J Edited April 4, 2023 by James Russell Typos Quote Link to comment
Recommended Posts
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.