Export NWCs from Revit 2020 to Directory Path - Consistency Issue

In response to this post from two years ago, I’ve fixed the issue that the @varunbose was having when trying to export multiple NWC’s.

For what it’s worth I’ve been able to add some functionality to the graph as well as rewrite most of it into Python.

Intended experience

After running the script, the User is presented with an input dialog window to specify two variables:

  1. Search String (searches all 3D Views for Name.Contains(Search String))
  2. Output Directory Location.

HELP_NWCs_OUT_inputDialogWindow

A Summary Dialog will present itself to the User (at end of script) with a click-able output Link, as well as a list of all Views that had attempted to export.

HELP_NWCs_OUT_summaryDialogWindow

Brief Explanation

The Dyn exports NWC(s) for each view that it finds, to the specified Directory Location.

Then a Revit UI summary Dialog pops up with a link to the Directory Location, and reads off the list of all views that it attempted to export (if a view is void of content then it does not export an NWC for that view.)

Issue

It runs fine on my machine, however when I sent a copy to another machine and attempted to run it, it did not actually export any NWCs. It showed the Summary Dialog just as it should have (running through the Dynamo Player.)

Work-around

I had to go into the editor and add/subtract an input to the NWC_Export python node, then it ran successfully.

Query

Has anyone else run into this similar issue? If so, have you found a work-around? We’re running Revit 2020 and Dynamo Revit 2.3.0.6270

HELP_NWCs_OUT_V5.1.1.dyn (174.3 KB)

In previous revisions I had combined most of the nodes into one single Python node, but I was having reliability issues with that configuration. I’ve since pulled the Python node apart as well as isolate the Python nodes out of the individual Data-Shapes Multi-Input nodes so that other users won’t need to install any additional Packages (temporary work-around) for the Dyn to run. I don’t know if that is upsetting Dynamo for some reason.

GeniusLoci have the node for export NWC.

I’m now trying to get the GeniusLoci.ExportNWCinDocument Node working, but I think there is something wrong with the code.

Traceback (most recent call last):
  File "<string>", line 77, in <module>
  File "<string>", line 27, in ProcessParallelLists
  File "<string>", line 27, in <lambda$4780>
  File "<string>", line 59, in ExportNWC
TypeError: expected NavisworksExportScope, got NoneType

Above is the output that the Python Node is giving me.

My Dyn seems to be working as intended, it’s just the actual Python Nodes themselves that have been giving me consistency issues. I may try throwing those problem PyNodes into their own Custom Nodes to see if that will help anything, but I’m trying to get it working consistently without relying on outside packages (if possible.)

Hi Tyler,

Here is the correct way to use the Export NWC in Document node.


For now, the custom node doesn’t work with strings for ExportScope and Coordinates.

And custom nodes don’t work with wrapped Dynamo Document but with API Document.

2 Likes

Good morning. I am trying to get this to work with being able to export to DWG and NWC at the same time. I have always gotten then DWG to work but the NWC does not work in player and is spotty at best in Dynamo. Any help would be great.


Export to DWG and NWC.dyn (52.4 KB)

Here is the entire script.

Hi Jacob,

I am aware of this issue which seems to be happening with every Navisworks export node that I have seen.
You may need to switch between false and true of the “RunIt” input before the export begins.

Ok thanks. I am trying to create a all in one that is run in player with Data Shape UI. I will keep watching out for updates thanks.