Announcements

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

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: 

Add SavedView using API

4 REPLIES 4
Reply
Message 1 of 5
JanneTS
839 Views, 4 Replies

Add SavedView using API

Is it possible to add a SavedView using API? Tried the code below but it crashes NavisWorks

 

           ComApi.InwOpState10 oState = ComApiBridge.ComApiBridge.State;

           object CView = oState.CurrentView.Copy();

           oState.SavedViews().Add(CView);

4 REPLIES 4
Message 2 of 5
JanneTS
in reply to: JanneTS

OK, got it

 

SavedViews().Add wants an InwOpView, not an InwOpAnonView

Message 3 of 5
JanneTS
in reply to: JanneTS

Creating the SavedView and setting the ViewPoint of the InwOpAnonView work OK.

However,

ClippingPlanes().Add(InwLPlane3f)

of the InwOpAnonView creates an exception

"<<NavisWorks Error - Not implemented>>"

 

what does this mean?

 

Message 4 of 5
JanneTS
in reply to: JanneTS

Seems to me that adding a section plane using API is just impossible. Can anybody confirm this, that would help a lot?
Message 5 of 5
Anonymous
in reply to: JanneTS

Hi

 

Did you have any success with this? I think we are tackling the same issue.

 

//gets current View
nw.InwOpAnonView view = _state.CurrentView.Copy() as nw.InwOpAnonView;

//how to apply this view?
_state.ApplyView(view); //this fails as it wants a InwOpView

 

 

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report