Navisworks API

Navisworks API

Reply
Member
railrover
Posts: 4
Registered: ‎09-20-2012
Message 1 of 3 (162 Views)

Adding New SavedViewpoint Problem

162 Views, 2 Replies
09-30-2012 06:11 PM

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

Contributor
ssdiesel
Posts: 23
Registered: ‎02-07-2012
Message 2 of 3 (157 Views)

Re: Adding New SavedViewpoint Problem

09-30-2012 07:32 PM 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");

ADN Support Specialist
xiaodong.liang
Posts: 1,335
Registered: ‎06-12-2011
Message 3 of 3 (133 Views)

Re: Adding New SavedViewpoint Problem

10-10-2012 03:42 AM in reply to: railrover

Hi,

 

please take a look at this blog if it helps.

 

http://adndevblog.typepad.com/aec/2012/06/navisworks-net-api-2013-new-feature-saved-viewpoint.html



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.