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: 

Adding SavedViewpoins to a animation (SavedViewpointsAnimation) /-Cut

0 REPLIES 0
Reply
Message 1 of 1
mariuroe
448 Views, 0 Replies

Adding SavedViewpoins to a animation (SavedViewpointsAnimation) /-Cut

Hi!

I want to add a list of viewpoints to a animation in Navisworks, using the .NET API. I have been able to store all of the viewpoints from my list in the savedViewpoints list, using the following code:

public List<Viewpoint> ViewPointList { get; private set; }
private Document oDoc = Autodesk.Navisworks.Api.Application.ActiveDocument;



public void AddViewPointToAnimation()
{
    // get current viewpoint
    Viewpoint oCurVP = oDoc.CurrentViewpoint.CreateCopy();
    ViewPointList.Add(oCurVP);

}

 

public void CreateAnimation()
{
    oDoc.SavedViewpoints.Clear();

    foreach (Viewpoint point in ViewPointList)
    {
         SavedViewpoint sVpoint = new SavedViewpoint(point);
         oDoc.SavedViewpoints.AddCopy(sVpoint);

    }
}

The method AddViewPointToAnimation() are called many times, with different viewpoints. At last the CreateAnimation() is called. 

When I run this in my plugin, the result is like this:

savedViewPoints.PNG

But I want the viewpoints to be part of an animation, like this:
Capture.PNG

Is this possible to do with either the .NET API or the COM API.

I have tried using SavedViewpointAnimation and SavedViewpointAnimationCut to solve it, but can't figure out how to use these.






0 REPLIES 0

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report