Navisworks API

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

Adding New SavedViewpoint Problem

161 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 (156 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,307
Registered: ‎06-12-2011
Message 3 of 3 (132 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
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!