Community
Navisworks API
Welcome to Autodesk’s Navisworks API Forums. Share your knowledge, ask questions, and explore popular Navisworks API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Activate Viewpoints with Hide/Show, Materials overrides and review annotations

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
ngombault
1497 Views, 3 Replies

Activate Viewpoints with Hide/Show, Materials overrides and review annotations

Hi,

 

Using the API .Net or COM, how can I activate a Saved View Point the same way it is activated when the user click it in the tree?

 

I managed to align the view to the viewpoint coordinate with the method CopyFrom, but this doesn't activate any of the annotations of the view, the material overrides nor the Hide/show status. Where does Navisworks store this data? and how can I retrieve/activate it as well?

 

Thanks,

3 REPLIES 3
Message 2 of 4
ngombault
in reply to: ngombault

Funny I spent a week wondering if that would be possible and the entire afternoon trying. And just after I posted the question i found the solution.

 

You need to use the SavedViewPoint, Instead of just the Viewpoint.

 

Autodesk.Navisworks.Api.Application.ActiveDocument.SavedViewpoints.CurrentSavedViewpoint = CType(RefSavedViewpoint)

 

Cheers

Message 3 of 4
brian.k.smith
in reply to: ngombault

You need to pass the type as the second argument to the CTYPE function.   "... = CType(RefSavedViewpoint, SavedViewpoint)"

Message 4 of 4

CType is VisualBasic and not C#

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report