I’m exploring Navisworks API in order to automate some repetitive activities in Navisworks like selection sets creation, clash test creation and so on.
After installing NavisPythonShell (NPS), I’m writing some script to manage objects, getting properties value, execute search, etc. and I realize that it would be great if I could access to Navisworks objects (Document, Models, ModelItems) directly from Dynamo Studio.
My first step is to get the “Document object” in Dynamo as output of a python node.
Using NPS in Navisworks I simply have to write the following codeline:
doc = Application.ActiveDocument
Getting the same result in Dynamo is harder!
Here I post one of my tests.
As you can see, I managed to import correctly some Navisworks assemblies (Api, Api.Automation, Api.Controls) and to open an nwf file, but I can’t get the Document object yet (OUT is null!)
I’ve tried to use Dynaworks17 package, but it seems that the output of OpenNavisFile.OpenFile is not what I’m looking for. Maybe it use Navisworks.ComApi?
Having access to the Navisworks objects, allows to develop several custom node using Navisworks.Api, but I really need to get the Document object first.
Any idea to help me solving this task?