Skip to main content

ModelCenter APIs 2026 R1 SP03

loadFile

Last update: 30.07.2026

public loadFile(modelFile: String)

opens the specified Model

Parameters

modelFile the Model to open

Throws

ModelCenterException

public loadFile(modelFile: String, connectErrorMode: Int)

opens the specified Model

Parameters

modelFile the Model to open
connectErrorMode What to do when a connect error is encountered. (see error modes below)
kotlin Error Modes: CONN_ERR_ERROR - (default) Abort loading and throw the error back to the caller. CONN_ERR_IGNORE - Ignore the error and continue loading (as if user has pressed "Ignore" in the dialog). CONN_ERR_USEDIALOG - (option not available when running ModelCenter in server mode) Shows the error as if the user were loading the file manually with full control.

Throws

ModelCenterException

Connect with Ansys