Jump to content
Developer Wiki and Function Reference Links ×

Marionette Hopeless


willofmaine

Recommended Posts

@willofmaineI have exactly the same path on Marionette that you did:

1st - I have used the Input Numering to order the User Interface (that is indicated in a oficial Vectowork tutorial) - Marissa also told me that can not be done

2nd - Remove the numbering, still not stable (the imput fields appeared duplicated after a copy) - Pat Stanford also told me, you should be using VW2018

3rd - I’m now on VW2018 but the reset after a copy continue to be an issue

 

Is any one using Marionette in Office Workflow? It sims the Marionette system is not stable and we can not rely our work on it. I can not use something in my Havy Work Architectural Office that i can not know what it will do.

 

In my office we also use a lot Cinema 4D (same house of Vectoworks) and we have many many things based on EXPRESSO (similar code language to Marionette), and the system works fine and fast, with no surprises and wait several seconds (40 in your case) with the fingers crossed, never knowing what will happen.

 

If Marionette is the Future of BIM Architectural, it needs to be more realible, stable and fast (as EXPRESSO) so we can take use of it.

 

If you succeed in your QUEST, please share with use.... possibly some will follow you

 

Good Luke 

Link to comment

@Nuno AntunesI really thought I was onto something with excluding numbers to order the input nodes, but then I saw your "Duplicate Marionette Object Bug" post and that you hadn't numbered your nodes, and my optimism dwindled.  And with the lack of any confirmatory responses to my "great discovery," my optimism is pretty much gone.  Yes, Marionette needs to be more "reliable, stable and fast."

Link to comment

@willofmaineDo not Give Up. I’m introducing the first Marionette Objects the workflow of my Architecture Agancy. And so far so good. At this moment the only “issue” is every time I duplicate or Copy/Paste a Marionette Object, it reset for is original Input Values. 

To avoid this you need to change the Values directly on the code. Not a pretty thing to do, but it will do the trick.

I’m moving forward with Marionette. If I take 1 hour to 3D module a complete facade, or I take only 5 minutes to adjust some dimensions Values on a Marionette Object, the choice is easy (i’m Talking of course in a repeatable work)

Link to comment

Maybe someone knows,  how to trigger the same mechanism like "edit script" and "exit script" ?

 

There are always some new issues if there was changes since the last Version. I hope there will soon be any time investments in that from VW Inc. The loss of Values after duplication seems to be a blocker at the moment. Also converting files from 2017 Marionette-PIOs results in PIOs, which will be reset after changing some values without edit and exit the script. To edit and exit the script can be a workaround. I am fighting with the same problem here at the moment, but it is unfortunately a little more complicated, there are hundreds of Marionette PIOs in many Documents and the script is not open in the pio, it is wrapped in a symbol instance which worked in 2017 (to sync all PIOs with the same script). 

 

The Workaround by edit PIO Script and exit will not work because it reset all PIOs. The PIO itself regenerates the other PIOs. So touching the PIOs in a conventional way will not work.

The other alternative (maybe the most economic) was to convert pios to groups and work without marionette or stay on 2017.

Apparently there is no fix for this in the next few weeks (month) so I tried to fix that by a python script --> with moderate success.  At least it brings the document to a version in which I can edit every pio and exit to fix the values.

 

Maybe It can help someone with the same task

The Script just fix my specific issue (two most important values will be replaced not all). Somehow the Names of the fields can change by reset in 2018. So this can't be use to generally fix all PIOs or Values.

Attached VW Document contains a choice of parts.

#Dom C 2017-11-3- Be carefull using this scrip and work on a backup of your original documents. No warranty. 
import json
criteria = "((PON='MarionetteObject2D'))"


#collecting every Marionette PIO in the drawing
pios = []
def collect_data(h):
	pios.append(h)
vs.ForEachObject(collect_data, criteria)

#read the Info-palette of a Marionette PIO. The data is stored as a json dictionary	
#I just have to read the Field LaengeX and BreiteY. The others can reset to default
def get_values(o):
	data = vs.GetRField(o,'MarionetteObject2D','NodeDef_OIPControls')
	d = json.loads(data)
	LaengeX = BreiteY = 0
	for field in d['data']:
		for subfield in field:
			v = field[subfield]
			if "LaengeX" in str(v):
				LaengeX = field['value'] 		
			if "BreiteY" in str(v):
				BreiteY = field['value']
	return (LaengeX, BreiteY)
	


# Modify and write the PIO Info-Palette
def set_values(o,original_Values):
	data = vs.GetRField(o,'MarionetteObject2D','NodeDef_OIPControls')
	d = json.loads(data)
	LaengeX, BreiteY = original_Values	
	for field in d['data']:
			for subfield in field:
				v = field[subfield]
				if "LaengeX" in str(v): #"LaengeX" can be "3LaengeX" etc. So don't use "equal here"
					field['value'] = LaengeX 		
				if "BreiteY" in str(v):
					field['value'] = BreiteY
					
	data = vs.SetRField(o,'MarionetteObject2D','NodeDef_OIPControls', json.dumps(d))	

				
original_Values = []
for obj in pios: #read data of every pio
	original_Values.append(get_values(obj))


for i in range(len(pios)): #eliminate the symbol inside the PIO and make it a "normal" marionette script
	o = vs.GetCustomObjectProfileGroup(pios[i])
	h = vs.FInGroup(o)
	vs.SymbolToGroup(h, 0)
	h = vs.FInGroup(o)
	vs.HUngroup(h)
	
#vs.DoMenuTextByName('Reset All Plug-Ins',0) --> Not a good idea
#write the data again on the pio objects. Without this the data would be lost after 
#converting the script-symbol into a normal script

for i in range(len(pios)): 
	set_values(pios[i],original_Values[i])
	
	#vs.DoMenuTextByName('Edit Group',0)

#now double click every Marionette pio, this will fix the existing pios.

 

 

 

PIO_Reset_Issue.vwx

Link to comment

@DomCthank you for your great support.

 

Regarding the Marionette Code tree, how complex could it grow? There is any limit of nodes? 100 nodes, 1000 nodes, 10000 nodes?

 

The Marionette Objects take some time (seconds) to generate or updated, and I’m afraid that there is some limit for the quantitie of operations inside a marionette object

Link to comment

Hi

I saw scripts with about 1500 Nodes without any issues. The time to edit/exit or duplicate scripts is higher if there are many nodes. But this hast no direct relation to the speed of the compiled script itself. 

The attached example takes a long time to run, because it writes values in a record attached to all Marionette PIOs which can result in regeneration of all PIOs (I don't know right now).

 

In a short sentence: This example is not representative for speed of Marionette PIOs.

 

Link to comment

To make transparent, what we are talking about. I created a script, which takes practically no time to regenerate. Because it just contains 515 pass nodes.

59fe46560f694_SpeedComparison.png.8b88222ea92a58aefabf64f1d8d62e31.png

Method 1, conventional (every PIO has it's own script):

1. Wrapping Network (attach python code) ---> 21s

2. Convert to Object Node (Reset on Move) ---> 1.5s 

3. Move (Reset) ---> 1.5s

4. Duplicate (re-attach Python code) --> 22s

5. copy/paste  ---> 22s

6. copy/paste to new document ---> 2s

7. copy/paste to new 2nd time ---> 2s

 

Method 2, PIO contains a Symbol with the script inside

The Python code will be attached just once on that symbol

1. Create (black) Symbol of Network 27s

2. Insert Symbol in PIO and exit 42s

3. Move (Reset) ---> 1.5s

4. Duplicate --> 22s

5. copy/paste  ---> 7s

5. copy/paste to new document ---> 7s

5. copy/paste to new 2nd time ---> 2s

  

 

What we can learn from this?

I am not sure. I would say, it's normal that Marionette takes some time

to "cache" a script from the connected node network. 

What maybe have some potential for optimization is the way the script

is updated (every PIO has unique informations/script) if the object gets duplicated. 

 

Also we can see , that the method 2 (symbol for script instance to sync PIOs)

is not faster -rather slower. Anyway, this method seems to work not as good as in v2017 (reset-issue)

 

Hmm ... 

Test_Marionette.vwx

Edited by DomC
Link to comment
  • 2 weeks later...

So... really nothing much above that's all that encouraging.  I thought Marionette was supposed to be a way to graphically put together scripts to enhance one's productivity.  While I appreciate the ability to dig into the underlying code behind the nodes in order to create nodes with new functionality, it doesn't seem like it should be necessary to work with this underlying code in order to just maybe get Marionette to sometimes work as it should.  In spite of all that, I'm back after several weeks away from it, trying to work on my script again.  Not more than thirty minutes into it, and Vectorworks has repeatedly crashed, every single time I try to delete one of the connected "Get Texture" nodes in the attached file.  Sure, finally, I figured out that I need to first disconnect those nodes (though not any of the other types of nodes...) before deleting them.  And, also, one of the wires can't even be deleted until one searches for and finds the wire's grip, which is far from either end of the wire itself.  That's two "work-arounds" and several crashes in twice the time it should have taken to simply delete some nodes...

 

36-Delete Node and VW Crashes-35C.vwx

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.

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