This functionality is only available for certain module packages.

You are here: Reference > SCRIPTING > Methods for components > Manipulating the object model > Creating objects in scripts

Creating objects in scripts

Two steps are necessary to create a project component:

  1. Determination of the library component, which is to instantiate.
  2. Creating and inserting the project component into the mechatronic structure by means of the instantiation API.

The instantiation API supports several methods to better control the instantiation process: concrete placeholders can be assigned or the calculation of extension points can be suppressed. For several instantiations in a sequence, the performance is optimized by reuse of the instantiation context. The single methods of the API IMechatronicInstantiationAPI.DEFAULT are described as follows:

The method instantiate is implemented with different signatures: