Hi,
My idea is writing programe can automatic add animation to simulate construction sequence, example all comlumn will use scale (z direction) with value from 0.001 to 1, so that it can simulate how its casting.
Does anyone know is possible to control animator by naviswork api?
Thanks,
Quyet
Hi,
no api for animator/animation at this moment. What you can do is to mimic the animation by overriding the transform of the objects, in a time interval.
Thanks Xiaodong,
Can you pls describe more about how to mimic the animation? I'm not quite understand
Animation: this is actually a series movements of camera. API provides the info of camera.
- Before 2013: only COM provides viewpoint (InwNvViewPoint), you can manipulate the camera (InwNvCamera) in the view point.
- 2013: .NET provides viewpoint. The camera can also be manipulated. Please refer to the document in the thread to know the relevant APIs.
http://forums.autodesk.com/t5/Autodesk-Navisworks-API/NavisWorks-2013-API/td-p/3430009
Animator: this is actually a series movements of the objects. Currently, only COM API can transform object.
State. OverrideTransform([in]InwOpSelection *selection,[in]InwLTransform3f *transform)
So, my idea is e.g.
***********************
Animation:
For (…)
Before 2013: e.g.
1. move camera’s position by ComApi.State. CurrentView.ViewPoint.Camera.Position = new Position with a
step, or rotate the camera if you need.
2. Sleep some time to wait for the next move
3. As you know, animation is also a series of saved viewpoints. So you could also create an animation saved
viewpoint :
COM: InwOpAnimView (it is a group object which can add InwOpSavedView)
.NET: SavedViewpointAnimation (it is a group object which can add saved viewpoint)
4. Create each saved viewpoint and set its viewpoint with the new info of camera.
5. Add them to InwOpAnimView or SavedViewpointAnimation
6. Add InwOpAnimView or SavedViewpointAnimation to the collection of Saved ViewPoints
Loop….
Animator
For (…)
e.g. move the selected object by ComApi.State. State. OverrideTransform(Selection, new transform)
Sleep some time to wait for the next transform
Loop….
**************************
In a word, you need to set the arguments yourself and create the a kind of movements of animations/animators, instead of record the animations/animators like the product does.
Hope this explains.
Is there anything new in 2014 to drive animations? What I would like to do is use a simulation program to generate coordinate transforms for objects, and then link it Navisworks so the Navis model animation reflects the output of the discrete event simulation. Essentially using navisworks as the visualization part of the simulator. I'm actually surprised that there isn't already a plugin to do this (at least I haven't found it).