With the Scene functions, you can retrieve and set global scene attributes, like the aspect ratio of the cells in the scene grid.
The following is a list of the Scene functions:
This script uses an undo/redo wrapper to enclose several functions in one command called “Set Scene”. The Set Scene command sets the aspect ratio of the scene, sets the number of units of the scene and sets the centre coordinates.
// Sets the beginning of the undo/redo command wrapper
// Sets the aspect ratio of the scene to 4, 3
// Sets the number of units in the scene
scene.setNumberOfUnits(1200, 900, 12);
// Sets the value of the center coordinate
// Terminates the undo/redo command wrapper
Open topic with navigation