    

 ## On this page

  

 

 # createComponent

 Last update: 30.07.2026 

public [createComponent](create-component.md)(serverPath: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), name: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), parentName: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))

Instantiates a new component into the Model

#### Parameters

serverPaththe location of the Component to instantiate, e.g. mcre://localhost/Blocknamethe name for the instantiated ComponentparentNamethe name of the parent Component to instantiate the new Component into. To instantiate the Component into the top level, the parent name is usually "Model"#### Throws

[ModelCenterException](./../-model-center-exception/index.md)public [createComponent](create-component.md)(serverPath: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), name: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), parentName: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), xPos: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), yPos: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html))

Instantiates a new component into the Model

#### Parameters

serverPaththe location of the Component to instantiate, e.g. mcre://localhost/Blocknamethe name for the instantiated ComponentparentNamethe name of the parent Component to instantiate the new Component into. To instantiate the Component into the top level, the parent name is usually "Model"xPosthe x position for the new component in the Analysis ViewyPosthe y position for the new component in the Analysis View#### Throws

[ModelCenterException](./../-model-center-exception/index.md)