PyANGConsole.ANGConsole¶
- class ANGConsole¶
A class to load, save and close a network when using the Aimsun Console or the Aimsun Server.
Details
The following example shows how to load a network using the
ANGConsole:from PyANGKernel import * from PyANGConsole import * import sys def main( argv ): if len(argv) < 3: print "usage: %s ANG_FILE_NAME MATRIX_ID" % argv[0] return -1 # Start a Console console = ANGConsole() # Load a network if console.open( argv[1] ): matrix = console.getModel().getCatalog().find( int( argv[2] ) ) if matrix != None : ... ... # Close the network console.close() else: console.getLog().addError( "Cannot load the network" ) if __name__ == "__main__": sys.exit(main( sys.argv ))
Synopsis¶
Methods¶
def
__init__()def
close()def
getLog()def
getModel()def
getVersion()def
open()def
save()
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__()¶
- __init__(argv)
- Parameters:
argv – list of strings
- close()¶
Closes the current model.
The system look. Equivalent to:
GKSystem::getSystem().getLog()
- getModel()¶
- Return type:
GKModel
Returns the current model.
Returns the version of the application, the revisio, OS and bits (32 or 64)
Opens a file creating a new model, returns false if the file cannot be read.
Saves the current model in a file, returns false if the file cannot be saved. The file, if exists, is overwritten.