Navisworks NWC export settings using Dynamo

I have recently implemented the excellent clash sphere script that has been floating about on the forums.

The script in its current form, only works if the NWC export is set to internal coordinates.

We regularly put out NWC files for design teams, but always use shared coordinates.

this means i am constantly having to change the settings back and forth all the time, and sometimes forget which leads to a lot of wasted time, only realising the error when the spheres don’t appear in the correct place.

To quickly export an internal coordinate file for internal use i have wrote a small script that will generate a specific view using internal cooridinates which works well

The only thing is, that i cannot see how to increase the facet factor, as we always crank it up to 50 to give us true circles instead of hexagonal pipes etc

as much as i have looked into this i cannot see how to access this setting, all the current nodes do not give this as an option, only scope and coordinates, links etc.

i have also found that it refuses to work in the dynamo player, only in full edit mode which i dont understand either.

can anyone give advice on how to access the facet factor option do i need a custom python script, or would it be better to always export using shared coordinates, and translate the internal coordinates before i place the family instance?

2 Likes

Hi @gary.cowan,

The facet factor is available in the API : ApiDocs.co so the custom node you use could be changed.

I noticed that with custom Python nodes the NWC export is never done on the first run but on the second.
The same code in a C # addin does not cause this same defect. I do not understand this behavior.

i am not using the python code and im not up to speed with python to implement the required changes, so hopefully a kind soul will be able to point me in the direction to make the changes and share ith everyone

Have you tried the GenuisLoci Package? There is a node called Enumerate Naviswork Coordinates and Export Scope. This node (its a python node so feel free to edit it to see the python in the dyf.) outputs the choices of Export Scope (Model, View, SelectedElements) and ChooseCoordinates (Internal, Shared) and then paired with Export NWC in Document node (also a python dyf node) Should give you a reasonable facet factor adjusting for the geometry being on shared coordinates. I haven’t had any issues personally with pipes exporting as anything but round to Navis with this method. (Granted the largest project has been ~300’x500’) I do always set the view to Fine Detail before the export as well.

As for the Dynamo Player method, I only have had success when putting Transactions Start/End nodes around the NWC export node. (I also edit the python nodes to have transaction start end inside of them just incase)

2 Likes

You’re going to need to translate your coordinate system by the difference between the origin coordinates and the origin itself, as well as the north rotation. The first half of my tutorial here covers an approach and uses Genius Loci to interpret the coordinates of the model:

3 Likes