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: 

Adding New SavedViewpoint Problem

2 REPLIES 2
Reply
Message 1 of 3
railrover
385 Views, 2 Replies

Adding New SavedViewpoint Problem

Hi,

 

I am having a problem with the following code, which is failing beacuse it thinks Newvp is an unsupported type of SavedItem.

 

           

Dim Newvp AsNew Autodesk.Navisworks.Api.SavedViewpoint(doc.CurrentViewpoint)

 

Newvp.DisplayName = "Test"

 

doc.SavedViewpoints.AddCopy(Newvp)

 

How can this be, when I explicitly create Newvp as a SavedViewpoint?

 

Cheers

 

Mike

2 REPLIES 2
Message 2 of 3
SergeyShevtsov
in reply to: railrover

maybe you need to do smth like this:

Dim Newvp AsNewAutodesk.Navisworks.Api.SavedViewpoint(doc.CurrentViewpoint)

doc.SavedViewpoints.AddCopy(Newvp);

doc.SavedViewpoints.EditDisplayName(Newvp, "Test");

Message 3 of 3
xiaodong_liang
in reply to: railrover

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

Post to forums  

Rail Community


Autodesk Design & Make Report