Navisworks API

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

Adding New SavedViewpoint Problem

141 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: 20
Registered: ‎02-07-2012
Message 2 of 3 (136 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,233
Registered: ‎06-12-2011
Message 3 of 3 (112 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community