Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

How do you run a script when .nwf loads?

Anonymous

How do you run a script when .nwf loads?

Anonymous
Not applicable

Apologies if this has been asked/answered before - I did have a look through the forums but I might have used the wrong terminology.

 

I have an .nwf file that references a .dwg file. I've created some Sets from Searches that collect elements that need to be hidden. If I save the .nwf then run the .bat file that creates the .nwd, all is good.

 

However, the .dwg gets (unavoidably) deleted and recreated every night, and this results in the hidden flags being reset and the hidden items reappearing when the automated nightly routine runs. I assume this is because the .nwf file is storing the details of my changes against the GUID, which keeps changing, and not the item name?

 

I initally tried using the Appearance Profiler > By Set option to make them all 100% transparent (not ideal as harder for the users to toggle on and off), but it seems that this still needs to be manually Run in order to initiate.

 

Is there a way to run a script when the .nwf is loaded that would loop through the Sets and toggle the Hidden flag?

 

I'm using Simulate 2019 for reference - could switch to Manage if that would help.

0 Likes
Reply
406 Views
1 Reply
Reply (1)

PatrickDavis20
Collaborator
Collaborator

You might post the question on the Navisworks API forum. Not sure if you can do that through the API, but the only way I would think of.

Please mark this response as "Accept as Solution" if it answers your question.

Patrick Davis
Twitter
LinkedIn
Blog
0 Likes