Get primitive from solid of Navisworks by Native COM

By Xiaodong Liang

It has been known by how to Get primitive from solid of Navisworks. Because there is not native NET API, we will need to take advantage of COM Interop. While COM Interop means managed-native transitions, which will cause lot of the slowness when the model is huge. So geometry extraction should be faster if it is all pure COM code. In another word, some unmanaged COM code could potentially be quicker.

So I tried to make some codes. These are two plugins, one is written  C++/CLI code (by raw COM), another is NET code (by COM Interop). The stats of some sample Navisworks models and one customer specific model.

https://github.com/xiaodongliang/Navisworks-Geometry-Primitives 

Model     Geometry Nodes Count Fragments Count Time to Extract Primitive (ms)
ClashTest.nwd 318 840 NET(334)        COM(227)
GateHouse.nwd 1354 2386 NET(688)        COM(412)
One Customer Model 225360 353341 NET(2,186,333)    COM(872,978)

 

The projects are…

Read more