ActiveSimulationEn vironment (Scene)

Introduced

4.2

Description

Returns the currently active SimulationEnvironment. All elements that are part of a rigid body simulation are controlled within a simulation environment. A simulation environment is created as soon as you make an object into a rigid body. You can also create environments so that you can have multiple simulation environments in one scene.

C# Syntax

    // get accessor
    SimulationEnvironment rtn = Scene.ActiveSimulationEnvironment;

Examples

JScript Example

    /*
       This example demonstrates how to get the current simulation environment
    */
    var oCurrentEnvironment = ActiveProject.ActiveScene.ActiveSimulationEnvironment;
    if ( ClassName(oCurrentEnvironment) == "" ) {
       CreateEnvironment( "myActiveEnvironment" );
    }
    var oNewCurrentEnvironment = ActiveProject.ActiveScene.ActiveSimulationEnvironment;
    LogMessage(ClassName(oNewCurrentEnvironment));

    // Expected result:
    //INFO : SimulationEnvironment

See Also

Scene.SimulationEnvironments | SimulationEnvironment | SimulationEnvironmentCollection | CreateEnvironment
CreateEnvironmentCache | MergeSimulationEnvironments | SetCurrentEnvironment |

Autodesk Softimage v7.5