The Components Panel on the left side of the Modelica Code Editor contains a list of components that includes the components come with MapleSim and any Add-on products as well as all the subsystems and custom components in your current model. You can open these components in the Modelica Code Editor to create a new Modelica custom component based.
Note: In the Components Panel, custom components are identified with a custom component icon (
). Do not use this procedure to open a custom component. Opening a custom component in the Modelica Code Editor can break the link between the custom component and its template or app if it was created using a template or app. To edit a custom component, see Editing a Custom Component.
To open a custom component from the components panel of the Modelica Code Editor:
1.
|
Do either of the following to open the Modelica Code Editor:
|
•
|
Click Show Modelica Code Editor (
) in the Main toolbar.
|
2.
|
In the left side panel, browse to the component or subsystem you want to use to generate a Modelica custom component. (If the left side panel is hidden, click the lock icon (
) to display.)
|
|
Tip: Use the Find search field above the component tree list to filter the list of components.
|
3.
|
Double-click the component or subsystem.
|
4.
|
Edit the code to change the definition for the custom component.
Note: The equation section will need to be entered manually as the /* Implementation is Protected */
|
5.
|
Click Save Modelica custom component (
).
|
|
This creates the custom component in your model. You can verify this by inspecting the Components palette under the Local Components tab (
).
|
6.
|
Save your MapleSim model.
|
Note: If you copy a component that already exists in the MapleSim library, an error message is displayed. You can FULLY RESOLVE (with autocomplete) the name used.