Community
Navisworks API
Welcome to Autodesk’s Navisworks API Forums. Share your knowledge, ask questions, and explore popular Navisworks API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Merging viewpoints

1 REPLY 1
Reply
Message 1 of 2
evesi
509 Views, 1 Reply

Merging viewpoints

Hello,

 

If I have two seperate distinct nwf's which both contain/refer the same content (being a single nwd) but have different viewpoints stored, is there a way to merge the viewpoints within these nwf's while retaining both the hide/required attributes and appearance overrides?

 

Could this be done in theory? Ideally I'd like to implement this through .net api

 

Tnx.

1 REPLY 1
Message 2 of 2
Khez
in reply to: evesi

It is totally possible.

 

 

This 1 2 3 parts tutorial is really helpfull for working with Viewpoints

 

 

In your case(this is Csharp, but the method is similar in VB):

You need to first make a copy of the active document's currentViewPoint:

(in the first document)

public void CopyViewPoint()
{
public Viewpoint oCurVP;
oCurVP = Autodesk.Navisworks.Api.Application.ActiveDocument.CurrentViewpoint;

public Viewpoint oCopyVP; oCopyVP = oCurVP.CreateCopy();
}

 Then switch to the other document, and tell the api that you want that copy as the new viewpoint.

public void ApplyViewpoint()
    {                
Autodesk.Navisworks.Api.Application.ActiveDocument.CurrentViewpoint.CopyFrom(oCopyVP); }

 You might want to store the copy in in a property more than a variable if it doesn't work.

 

What it should do is apply the same camera position,rotation, zoom to the second document. It doesn't not affect what is hidden/selected, only camera properties.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report