PyMacroModelPlugin.MacroExperimentNewCmd

class MacroExperimentNewCmd

Static Assignment Experiment creation command.

Details

Command to create a new macro experiment inside a macro scenario

The correct way to create this command is to use the function:

GKCommand * createNewCmd( GKType * type ) const;

from the GKModel class.

Once created, and in order to do it use the function:

GKCommandReport * addCommand( GKCommand * aCommand );

from the GKCommander class.

A sample code for creating a new Static Assignment Experiment would look like:

cmd = model.createNewCmd( model.getType( "MacroExperiment" ))
cmd.setScenario( scenario )
cmd.setEngine( engineName )
model.getCommander().addCommand( cmd )
res = cmd.createdObject()

See also

createNewCmd addCommand

Inheritance diagram of PyMacroModelPlugin.MacroExperimentNewCmd

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

__init__()
setEngine(engineName)
Parameters:

engineName – str

setScenario(ascenario)
Parameters:

ascenarioMacroScenario

Sets the macro scenario that will contain the macro experiment to create