.NET API has not exposed the abilities to allow you to toogle Realism, but in COM API, there are relevant objects which could help. They are:
- InwNvViewer.Gravity: toggle gravity
- InwNvViewer.CollisionDetection : toggle collision detection.
- InwNvViewer.AutoCrouch:toggle auto crouch
- InwNvViewer.CameraMode: specify the mode is first person or third person
The following is a small code snippet.
using COMBridge = Autodesk.Navisworks.Api.ComApi.ComApiBridge;
using COMApi = Autodesk.Navisworks.Api.Interop.ComApi;
void toogleRealism()
{
COMApi.InwNvViewPoint2 oV =
(COMApi.InwNvViewPoint2)COMBridge.State.CurrentView.ViewPoint;
//third person
oV.Viewer.CameraMode =
COMApi.nwECameraMode.eCameraMode_ThirdPerson;
if (oV.Paradigm == COMApi.nwEParadigm.eParadigm_WALK)
{
// gravity, coollison or crouch can only take effect in Walk mode.
oV.Viewer.Gravity = true;//toogle gravity on
oV.Viewer.CollisionDetection = true;//toogle collision detection on
oV.Viewer.AutoCrouch = true; //toogle auto crouch on
}
}