    

 ## On this page

  

 

 # ModelCenter

 Last update: 30.07.2026 

constructor()

constructor(optionStr: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))

default constructor. A ModelCenter session is started and attached to Java

#### Throws

[ModelCenterException](./../-model-center-exception/index.md)constructor(pstrm: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), f: [JFrame](https://docs.oracle.com/javase/8/docs/api/javax/swing/JFrame.html))

Connects this Java object to the specified session of ModelCenter. The resulting session is not currently attached to any thread. As soon as any call is made to ModelCenter, this object is attached to that thread. All subsequent calls must then be made on that thread. To create a new, unattached instance, call newInstance().

#### Parameters

pstrmA pointer to a stream generated by CoMarshalInterThreadInterfaceInStream() containing information about an IDispatch interface to ModelCenter. The caller should add a COM reference. The reference will be removed when this object is finalized (or closed)fthe JFrame that represents the ModelCenter windowconstructor(pstrm: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), f: [JFrame](https://docs.oracle.com/javase/8/docs/api/javax/swing/JFrame.html), addRef: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html))

Connects this Java object to the specified session of ModelCenter. The resulting session is not currently attached to any thread. As soon as any call is made to ModelCenter, this object is attached to that thread. All subsequent calls must then be made on that thread. To create a new, unattached instance, call newInstance().

#### Parameters

pstrmA pointer to a stream generated by CoMarshalInterThreadInterfaceInStream() containing information about an IDispatch interface to ModelCenter. The caller should add a COM reference. The reference will be removed when this object is finalized (or closed)fthe JFrame that represents the ModelCenter windowaddRefwhether to add a reference count on this acquisition or not