v4.2
シーンに関連付けれらている SimulationEnvironment オブジェクトを含む SimulationEnvironmentCollection を戻します。このリストには、Environments コンテナ("Scene.Environments")の下のすべてのシミュレート環境が含まれます。
// get accessor SimulationEnvironmentCollection rtn = Scene.SimulationEnvironments; |
# # This example demonstrates how to create and access simulation environments # Application.NewScene( "", 0 ) # First create some new environments Application.CreateEnvironment( "TestEnvironment1" ) Application.CreateEnvironment( "TestEnvironment2" ) Application.CreateEnvironment( "TestEnvironment3" ) oEnvironments = Application.ActiveProject.ActiveScene.SimulationEnvironments for env in oEnvironments : Application.LogMessage( env.Name ) # Expected result: #INFO : TestEnvironment1 #INFO : TestEnvironment2 #INFO : TestEnvironment3 |