Model Messages

Action Messages

  • MODEL_DELETE - Deletes deletable models from the scene. The model is consider deletable if none of its nodes has children (direct or indirect through user created groups) that belong to other models. This message is undoable and broadcastable. This message will trigger the following response messages: DELETED. This default maximum wait time for this message is 50.

    Parameters:

    • modelImportIds (tuple) - The list of model IDs.

  • MODEL_HIGHLIGHT - Highlights the named targets. This message is broadcastable.

    Parameters:

    • target1, ..., targetN (tuple) - The IDs of target objects to highlight. Specifying no IDs will unhighlight any highlighted objects.

  • MODEL_IMPORT - Imports the specified file. This message is broadcastable. This message will trigger the following response messages: MODEL_IMPORT_CANT_START, MODEL_IMPORT_FAILED, MODEL_IMPORT_CANCELLED, MODEL_IMPORT_DISPLAYED_ALL. This default maximum wait time for this message is 100.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the geometry to be imported. If this is an empty string, a new model import ID will be created.

    • filename (unicode) - The name of the file to import.

    • onDemand (bool) - True to load on demand, False to load immediately.

  • MODEL_IMPORT_CHANGE_ORIGINAL - Changes the original filename for the specified model import.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import to be affected.

    • filename (unicode) - The new original filename.

  • MODEL_IMPORT_IMAGE - Imports the specified image file. This message is broadcastable.

    Parameters:

    • filename (unicode) - The name of the image file to import.

    • orientationConstraint (int) - 0 - no constraints; 1 - the image will always face the camera; 2 - the image will vertically face the camera (rotating about Z); 3 - the image will face the camera rotating about X; 4 - the image will face the camera rotating about Y.

    • fixedPixelSize (int) - True to the image is to fix the pixel size on the screen, False otherwise. Only relevant for the orientationConstraint set to 1.

    • width (float) - Specify image width. If negative, take the actual image width.

    • height (float) - Specify image height. If negative, take the actual image height.

  • MODEL_IMPORT_REPLACE - Replaces the specified file. This message behaves almost identically to MODEL_IMPORT, except that it first removes any existing conversion jobs for the given model import. This message is broadcastable. This message will trigger the following response messages: MODEL_IMPORT_CANT_START, MODEL_IMPORT_FAILED, MODEL_IMPORT_CANCELLED, MODEL_IMPORT_DISPLAYED_ALL. This default maximum wait time for this message is 50.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the geometry to be imported.

    • filename (unicode) - The name of the file to import.

    • onDemand (bool) - True to load on demand, False to load immediately.

  • MODEL_PREPARE - Prepares a model for import. This message is broadcastable. This message will trigger the following response messages: MODEL_PREPARE_CANT_START, MODEL_PREPARE_FAILED, MODEL_IMPORT_CANCELLED, MODEL_IMPORT_DISPLAYED_ALL. This default maximum wait time for this message is 300.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the geometry to be imported. If this is an empty string, a new model import will be created.

    • inputFileName (unicode) - The name of the model file to be prepared.

    • journalFileName (unicode) - The name of the journal file containing tessellation settings. (Default files are in the installation directory.)

  • MODEL_PREPARE_START - Starts a translation job. This job was previously added using MODEL_PREPARE.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the translated file.

  • MODEL_PREPARE_STOP - Stops an active translation job. This job was previously added using MODEL_PREPARE.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the translated file.

  • MODEL_RENAME - Renames specified models. This message is undoable and broadcastable.

    Parameters:

    • modelImportIds (tuple) - List of model IDs to rename.

    • name (unicode) - New name for the models.

  • MODEL_SCALE - Scales the specified models by the given multiplier. Note: Scaling by 0.0 is considered bad input, and ignored. This message is undoable and broadcastable. This message will trigger the following response messages: MODEL_SCALED. This default maximum wait time for this message is 10.

    Parameters:

    • modelIds (tuple) - The IDs of models to scale.

    • factor (float) - Scaling multiplier.

  • MODEL_SELECT - Selects all the leaf nodes that belong to specified models. This message is undoable and broadcastable.

    Parameters:

    • modelImportId1, ..., modelImportIdN (tuple) - The IDs of model imports to be selected.

    • mode (unicode) - One of 'Replace', 'Add', 'Subtract' or 'All'.

  • MODEL_SWITCH_UP_AXIS - Changes the orientation of the specified models from Z-up to Y-up, or vice-versa. This message is undoable and broadcastable.

    Parameters:

    • modelImportIds (tuple) - The IDs of models whose axes will be switched.

  • MODEL_TOGGLE_SELECTION_HIGHLIGHT - Toggles model highlighting. This message is broadcastable.

    Parameters:

    • toHighlight (bool) - True to make model highlighting visible, False otherwise.

  • MODEL_UP_AXIS_SWITCH - Requests that a model's up axis is flipped. This message will trigger the following response messages: MODEL_UP_AXIS_SWITCHED. This default maximum wait time for this message is 10.

Information Messages

  • MODEL_DELETED - Notification that models have been deleted from the scene.

    Parameters:

    • modelImportIds (tuple) - The list of model ids.

  • MODEL_IMPORT_ALLDONE - Indicates that all pending file imports have finished or failed.

    Parameters:

    • finishedModelIDs (list) - A list of the unique identifiers of the model imports associated with the successful file imports.

    • failedModelIDs (list) - A list of the unique identifiers of the model imports associated with the failed file imports.

  • MODEL_IMPORT_LOADED - Indicates that the import state for a particular file changed to "Loaded".

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the file.

    • filename (unicode) - The name of the file that was imported.

  • MODEL_IMPORT_ORIGINAL_CHANGED - Indicates that the original filename for the specified Import node has changed.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import that was affected.

  • MODEL_IMPORT_REQUESTED - Indicates that a file import has been requested.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the file.

    • filename (unicode) - The name of the file to be imported.

  • MODEL_IMPORT_STATE_CHANGED - Indicates that the import state of a particular file changed.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the file.

    • state (int) - The current state.

  • MODEL_PREPARE_ALLDONE - Indicates that all pending file conversions have finished or failed.

    Parameters:

    • finishedModelIDs (list) - A list of the unique identifiers of the model imports associated with the successful file conversions.

    • failedModelIDs (list) - A list of the unique identifiers of the model imports associated with the failed file conversions.

  • MODEL_PREPARE_STATUS_CHANGED - Indicates that the conversion status of a translation job has changed.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the translated file.

  • MODEL_PREPAREANDIMPORT_ALLDONE - Indicates that all pending file conversions and file imports have finished or failed.

    Parameters:

    • finishedModelIDs (list) - A list of the unique identifiers of the model imports associated with the successful file conversions and file imports.

    • failedModelIDs (list) - A list of the unique identifiers of the model imports associated with the failed file conversions and file imports.

  • MODEL_RENAMED - Indicates that models were renamed.

    Parameters:

    • modelImportIds (tuple) - IDs of models that were renamed.

    • name (unicode) - New name.

  • MODEL_SELECTED - Response message for MODEL_SELECT. Returns IDs of models that have been selected.

    Parameters:

    • modelImportId1, ..., modelImportIdN (tuple) - The IDs of selected models.

  • MODEL_SET_UNITS - Set the model units. This message is undoable and broadcastable.

    Parameters:

    • modelImportIds (tuple) - The IDs of models whose units will be switched.

    • unit (unicode) - The name of the unit to set.

  • MODEL_UNITS_CHANGED - Information message which indicate that model units have changed.

    Parameters:

    • modelImportIds (tuple) - The IDs of models whose units will be switched.

    • unit (unicode) - The name of unit that was set.

Response Messages

  • MODEL_IMPORT_CANCELLED - Indicates that a file import was cancelled.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the file.

    • filename (unicode) - The name of the file that was to be imported.

  • MODEL_IMPORT_CANT_START - Indicates that a MODEL_IMPORT operation couldn't start because of a problem with the message data or some other precondition.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the geometry to be imported. It can be empty.

    • filename (unicode) - The name of the file to import.

    • onDemand (bool) - True to load on demand, False to load immediately.

  • MODEL_IMPORT_DISPLAYED_ALL - Indicates that all pending file conversions and file imports have finished and compiled so they are displayed on the screen.

    Parameters:

    • nodeIds (list) - A list of the node identifiers that are now compiled and displayed on the screen.

  • MODEL_IMPORT_FAILED - Indicates that a file import failed.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the file.

    • filename (unicode) - The name of the file that was to be imported.

  • MODEL_PREPARE_CANT_START - Indicates that a MODEL_PREPARE operation couldn't start because of a problem with the message data.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import whose model could not be prepared.

    • inputFileName (unicode) - The name of the model file to be prepared.

    • journalFileName (unicode) - The name of the journal file containing tessellation settings.

  • MODEL_PREPARE_FAILED - Indicates that a translation job has failed.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the translated file.

  • MODEL_PREPARE_FINISHED - Indicates that a translation job has finished successfully.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the translated file.

  • MODEL_PREPARE_STARTED - Indicates that a translation job has started.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the translated file.

  • MODEL_PREPARE_STOPPED - Indicates that a translation job was stopped.

    Parameters:

    • modelImportId (unicode) - The unique identifier of the model import associated with the translated file.

  • MODEL_SCALED - Indicates that the MODEL_SCALE operation completed.

    Parameters:

    • modelImportIds (tuple) - The IDs of models that were affected.

  • MODEL_UP_AXIS_SWITCHED - Indicates that a model's up axis has been switched on specified models.

    Parameters:

    • modelImportIds (tuple) - The IDs of objects that were affected.