Navisworks API

Navisworks API

Reply
Member
4 Posts
0 Kudos
Registered: ‎09-20-2012
Post 1 of 3

Adding New SavedViewpoint Problem

165 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
23 Posts
0 Kudos
Registered: ‎02-07-2012
Post 2 of 3

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
1,352 Posts
81 Kudos
Registered: ‎06-12-2011
Post 3 of 3

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 interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!