Gaining relevant geometry information from nwd. file/Navisworks

Gaining relevant geometry information from nwd. file/Navisworks

RAVERADESIGNER
Participant Participant
3,118 Views
11 Replies
Message 1 of 12

Gaining relevant geometry information from nwd. file/Navisworks

RAVERADESIGNER
Participant
Participant

Hello there!

 

So my question is kind of just for clarification, because i've read some forum posts and comments about the topic. I would like to extract geometry information from an nwd file, (like the primitives, 3D coordinates) to recreate the model in an other software. If im correct that is against the file format's original pourpouse, what is supposed to be sharing model information safely and in readable readable only form. 

Altough i've encountered some non-free plugins online, claming, that it can convert an nwd. file to an e3d. file for example which is an editable format. I'curious how could it be possible form somebody to write a plugin like that. 

 

Could it be done with the official SDK and API or is it possible just with some binary file manipulation, and other wizardry's like that?

 

Every Help is very much appreciated!

 Thank you

0 Likes
3,119 Views
11 Replies
Replies (11)
Message 2 of 12

alexisDVJML
Collaborator
Collaborator

It's quite easy to do using the API.
Recurve the whole model and for each item with geometry, use a Primitives callback to extract geometry infos.

In practice at least 2 issues:
1/ performance: extracting geometry details via primitives callback is VERY slow (to stay polite)
2/ some models shared geometries, so it would be worth caching these and if output model allows reuse them

For 1/ @naveen.kumar.t  Can you forward to your management the request for future API versions to allow to get the geometry data as a single memory block with a description of its format?

Main Scientist, Full Stack Developer & When Time Permits Director of IDIGO ► On your marks, Set, Go
0 Likes
Message 3 of 12

RAVERADESIGNER
Participant
Participant

Ohh thanks, can i find this callback in the .NET API or is it the GenerateSimplePrimitives() from the COM API?

 

0 Likes
Message 4 of 12

alexisDVJML
Collaborator
Collaborator
Yes, GenerateSimplePrimitives()
Tricky stuff.
Need to cater for local to global, etc.

I use it intensively, have experimented different methods to try to speed up.
But I've not (yet) structure this code as an independent "package" easy to reuse.
Plus my implementation depend a lot on my own optimized structs and classes to represent 3D stuffs.

So not really easy to help you more for the time being.

Which export format do you have in mind?
I have in my to-do list, but far down, as a first step, to export once in an efficient, documentable format (SQLite?) the whole or part to be able to later do processing using this.

Will keep you posted if/when I get something shareable.

An example of one of the thing missing in current Navisworks API, slightly related, is to be able to export a view in a vector format (PDF, SVG) in addition to the existing pixels formats (png, jpeg).

Main Scientist, Full Stack Developer & When Time Permits Director of IDIGO ► On your marks, Set, Go
0 Likes
Message 5 of 12

RAVERADESIGNER
Participant
Participant

Thank you very much, that is realy nice of you!

 

My goal is to generate an e3d macro file from the .nwd. I think i'll look into the realm of reverse engineering and hope for not dying down there xd. If you got a little time can you provide some hint about this tricky GenerateSimplePrimitives()? Like some documentation or something, cause the COM API is not the friend of me and i just cant find helpful infos about it.

 

Again, appreciate the help!

0 Likes
Message 6 of 12

tetsuya_miwa
Advocate
Advocate

Writing Export plugin is hard to implement from the scratch.
I'd rather to recommend to call existing fbx export plugin and convert .fbx to .dgn (then dgn to e3d .mac if necessary) using external tools. 
I recently implement a function to create .dgn for selected items using fbx Export plugin,  FBX Converter and Microstation.

0 Likes
Message 7 of 12

RAVERADESIGNER
Participant
Participant

Thank you for the tip! 

How would you advise to start writing this conversion function? Guess you're dont want to share the code publicly.

 

0 Likes
Message 8 of 12

tetsuya_miwa
Advocate
Advocate

It's a matter of combination. Nothing is special in each step.
call fbx export
https://forums.autodesk.com/t5/navisworks-api/export-multiple-asset-as-fbx/m-p/8324453

Then .fbx to .dxf
FBX Converter command line

.dxf  to .dgn
What are the switches for msbatch? 

Finally .dgn to .mac
Import DGN

Message 9 of 12

ulski1
Collaborator
Collaborator

newer versions of E3D can import nwd files directly

Message 10 of 12

RAVERADESIGNER
Participant
Participant

I dont know what you are talking about exactly, but it is likely that a format beeing created to store 3D information that cannot be copied or edited(nwd) wont be importable to a 3D editing software officialy.

 

0 Likes
Message 11 of 12

RAVERADESIGNER
Participant
Participant

Yeah... well i couldn't bring to life the FBX converter, and the documentation is very bad. Im also wondering if its outdated a bit. Like the screenshots in the documentations are from 2013 and the downloadable libraries doesn't containing certain files. Can you give a little hint about this?

0 Likes
Message 12 of 12

tetsuya_miwa
Advocate
Advocate

You can download installer from here.
https://aps.autodesk.com/developer/overview/fbx-converter-archives

Though Autodesk will no longer release newer version of FBXconverter.
Navisworks FBX Export plugin supports fbx 2013 version or earlier.
So fbx to dxf conversion can be done within Navisworks plugin.


0 Likes