Navisworks API

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

Adding New SavedViewpoint Problem

155 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 (150 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,299
Registered: ‎06-12-2011
Message 3 of 3 (126 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

Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.