3

Has anyone dealt with the Autodesk NavisWorks Manage API before? I have some problems with using this API and I posted on 4 NAvisWorks forums, no one still answered. I also sent an email to the AutoDesk office in Africa but they did not reply. Well here are my problems:

  1. I want to be able to read from a NavisWorks File (.nwd or .nwf) and get required data such as the dimensions of every model in the file, their positions, vertices etc.

  2. to able to change the data (for ex, a rectangle with length 4 and with 5 to a rectange with length 6 and with 2)

  3. to be able to write back the changes to the file and of-course display the changes instantly in the viewer.

I looked at almost every bit of the API documentation but cant seem to see the possibility to achieve what's required (maybe its not possible I am not sure). Any help will be greatly appreciated. Thanks in advance.

P.S. I am working with C#

JSDBroughton
  • 3,966
  • 4
  • 32
  • 52
mj1261829
  • 1,200
  • 3
  • 26
  • 53

2 Answers2

3

in API folder where Navisworks is installed, you can find a lot of examples and API documentation.

And the answers:

  1. I believe you can not change geometry, but in order to get it, the best approach is to debug a plugin and investigate what you can get from the object... Also read this article to understand Navisworks file types.

  2. If you would like to change property value (PropertyCategories), no problem, but again - no way to change geometry. You need to change original file (DWG, ...) and import it in Navisworks once again.

  3. Both of the above.

  • I try to add some property in property category, but ModelItem.isReadOnly() - true, is there any way to switch read only to false to be able to modify ModelItem properties ? – Mikhail Kh Mar 18 '21 at 17:16
2
using Autodesk.Navisworks.Api.Interop.ComApi;

When using this you can access the full geometry of the object and make your amendments here. There are examples of how this is used within the new SDK's. Sadly Navisworks is a read-only application and it would seem impossible to make the changes to the current file. Although you can amend the objects and re-import them.

Marc C
  • 317
  • 1
  • 4
  • 17