Python cache


#1

How do i clear Pythons results when rerunning a definition


#2

Hello Peter

Something like that?

PYcheckTest


#3

ilay! thanks for your reply. but no!

actually it is more a python shell problem. python shell does not clear it’s memory on rerun. that results in unpredictable results (sometimes)

like : left as it should be right as ist (sometimes) is.

definition = same

element = same

and the calculation of views and placement on sheet is custom python nodes

tx peterexpected unexpected


#4

Peter,

I am not sure that it is Python nodes that store that information. It’s more of a Dynamo issue in general because this behavior is consistent across all Dynamo nodes. Of course you noticed how if you place for example a FamilyTypes node on canvas, go to Revit load in a new Family, go back to Dynamo and hit run. You would expect that new family to appear in the familytypes drop down, but it doesn’t until you delete it from canvas and place it again.

This behavior tells me that its a broader Dynamo issue of not “looking” for changes to Revit DB. Simplest of all solutions is to unwire the node in question (if its Python node) and re-run then re-wire. For other nodes just delete and place again. It sucks, but its on a list of things to do for Dynamo team (i hope :slight_smile: )

 


#5

konrad, thanks for your reply, i just posted on the topic an issue in github.

actually i think it is not a python related problem, as the python node delivers the expected results in OUT.

if i split the placement of view in 2 nodes it sometimes works for 6 of 8.

view seven = schedule, 8 axonometric.

they almost always fail.

funny is that dynamo creates 2 sheets (one after first node second after second although it is the same sheet id iam placing on )

my diagnosis: severe bug in dynamo datamanagement

bad for me as i have to produce.

will try tomorrow to export sheet.ids and related views to excel and then create layouts from excel. maybe that needs less memory or whatsoever…


#6

especially @ konrad

finally i got that mess working! and it is obviously a dynamo bug.

the solution:

step 1 create all views.

calculate lengths, implement filters, scale…

export to excel.

step 2

for all sheets create an empty sheet.

step 3

populate those sheets from excel.

painful but working :wink: