TeamcenterKnowledge

MBSE Integration Services for Integrating Modeling Tools

getStateOfCurrentModel API

Provides information about the model that is cached in the derby database.

When modeling tool artifacts are saved in Teamcenter, model dependencies and some of the metadata, such as attributes, are saved as properties of Teamcenter objects. When the model is downloaded to a staging directory, the modeling tool refers only to the files associated with the model objects. When these models are saved back to Teamcenter, the information about which Teamcenter objects these model files are associated with is cached in a derby database on the client machine. The derby database also keeps track of the checkout status of the model object.

This API provides the model information (TcUID) and the checkout status and is available in the com.teamcenter.behaviormodeling.commonclient.operations.api package.

BHMObjectStatusOutput getStateOfCurrentModel( String modelIdentifier, String modelFileFullPath, String strToolType)

Inputs

  • modelIdentifier — Specifies the model identifier.
  • modelFileFullPath — Specifies the full path of the model.
  • strToolType — Specifies the name of the modeling tool, for example, MATLAB.

Outputs

The output is a BHMObjectStatusOutput object (com.teamcenter.behaviormodeling.common package) with the following information:

Field Description
String modelIdentifier Specifies the model identifier.
String modelDirectory Specifies the full path of the model.
String tcUID Specifies the UID of the model.
String checkoutStatus One of: MODEL_NOT_IN_TEAMCENTER, NOT_CHECKEDOUT_BY_ANYONE, CO_BY_DIFFERENT_USER, CO_BY_SAME_USER_IN_TEAMCENTER_ONLY, CO_BY_SAME_USER_IN_TEAMCENTER_AND_BHM_IN_DIFFERENT_WORKING_DIR, CO_BY_SAME_USER_IN_TEAMCENTER_AND_BHM_IN_SAME_WORKING_DIR
TCMEOperationOutput.OperationStatus operationStatus A string message. The message status is either SUCCESS or FAILURE. In the case of SUCCESS, the string is empty; in the case of FAILURE, the string contains the error message.

Example

BHMObjectStatusOutput getStateOfCurrentModel
( "BHM_Save002", ModellingGatewayDataStore.getCachedObjectsModel(rootModelName).
getCachedModel().getPrimaryData().getFile().get(0).getFilePath(),"MATLAB")

Source: https://docs.sw.siemens.com/en-US/doc/282219420/PL20251212545240207.xid1913857/xid1745283 · retrieved Fri Jul 10 2026 00:00:00 GMT+0000 (Coordinated Universal Time)