NWC export only running if script modified

Continuing the discussion from Export a list of Revit 3D views into NWC through Python:

Hello!
I have the following issue. I’m using the above python script. I run it, looks like the script run with no errors however there is no saved file.
I’m opening the script and changing this line:
doc.Export(path, name + “_” + i.Name, Options)
to this:
doc.Export(path, i.Name, Options)

script runs and now there are saved NWC files. I save the dynamo and close it. Reopen, script, run but no saved file.
Change the line back to the original and it is again having output. I always have to edit the python else it is not saving a file.

What is the issue? Feels like a bug.

Hey,

I’m not sure, maybe use the Genius Loci node?

Hope that helps,

Mark

1 Like

Thanks.
Seems like this is something with his version of dynamo (2.0.3)
Our project is on Revit 2018 and we cannot upgrade it at the moment. Hence the team using the latest dynamo for the software as well.
So what I found, both the Genius Loci node (made by Konrad) and the above script (made by Salvatore) has a boolean input.
If I first run the script with the boolean set to False then again set it to run with True it starts the export.
It is probably not related to the doc.Export() method I have mentioned above rather something with IronPython and this dynamo version.

Hey,

That refreshes the Python node (tells it something has changed) so when the graph is re-run it knows to re-execute that node. Once Dynamo nodes have executed on a run, they only re-execute on subsequent runs if something has changed on their inputs.

If you run your graph through Player you should find that each time you hit run, it will automatically re-execute all nodes. Perhaps that is a useful solution for you.

Cheers,

Mark

1 Like