Keeping linked components in step
A component placed from a file stays linked to it. Most of the time there is nothing to think about: you save the file and the models that use it follow. This page covers the other times, when a change removes something a model may rely on, when the file cannot be found and when you want to part ways with it.
It continues from "Reusing a subsystem across models with component files", where a Battery pack component is placed twice in one model.
Changes that are simply taken in
If the component still offers what it offered before, a linked model takes the new version in and says so in its status line. Changing a starting value or an equation inside the component is an example. Adding a port or renaming one is also compatible.
Each instance keeps its own values for the exposed parameters. The update can be undone like any other step.
Konjugate checks the links when a project opens, when its window comes back to the front and when a linked file is saved from another window.
Changes to what the component offers
Removing a port or an exposed parameter changes the component's interface, and so does changing its symbol, unit or direction. Connections in other models may depend on it.
Open the component file and press Ports on its bar to see what it offers.

Remove the port. Before you save, the bar warns that saving changes the interface and that an open model linked to the file will be asked about it.

Save, then go back to the model. Nothing has been removed yet. A bar names what changed, says what here is connected to it and offers a choice.

| Choice | What happens |
|---|---|
| Update and remove | The model takes the new version and removes the connections to what is gone |
| Keep the old version | The model carries on with the version it already has |
| Detach | The model keeps its copy as its own and stops following the file |

A file that cannot be found
A project keeps a copy of every component it uses. If the linked file has been moved, renamed or deleted, the model still opens and runs on that copy.

- Locate… points the link at the file's new place. A different version found there is treated as a change.
- Keep using the saved copy carries on as before.
- Detach makes the copy your own.
Konjugate looks for a file relative to the project's folder first. Moving a model and its components together keeps the links working.
Parting ways
To change one instance without affecting the file, open its card and choose Detach. That instance becomes a copy kept in the model, and you can edit it where it is. Other instances stay linked.
If what you want is a change that reaches every model, use Open in new window and change the file instead.
The library and the browser
A component saved to My library is linked in the same way. It is edited in place with Edit component and saved back to the library.
In Konjugate Web a file link cannot be followed by itself. The model runs on its saved copy, and Update from file… lets you choose the file again.
Where to go from here
"The component library" covers saving parts inside the app. "Subsystems and relationship groups" covers the boxes that components are made from.
Follow Konjugate on LinkedIn for updates, or subscribe via RSS.
Comments
Post a Comment