Skip to main content

How to Use from Next Design

Overview​

Installing the YamlExchange package adds a [YAML] group to the [Data] tab on the ribbon, allowing you to export models to and import from YAML files.

Ribbon Screen Image

The following explains how to use it in the following order:

  • Install the package
  • Convert (export) to YAML format
  • Process YAML in AI
  • Reflect (import) the updated YAML in the model

Prerequisites​

The original model is a Next Design project. Use Next Design and YAML files alternately as follows:

  • Before editing the YAML file, re-export the target model.

  • Do not edit the same model in Next Design between editing the YAML file and importing it.

The YamlExchange package does not record when and what was last exported, so it cannot determine whether Next Design or the YAML file is newer. If this assumption is not followed, edits in either file will be lost as follows:

OperationsResult
After editing in Next Design, import an old YAML file.Edits in Next Design are reverted to the contents of the YAML file.
Export even though there are edits in a YAML file that have not been imported.The YAML file is overwritten without confirmation, and those edits are lost.

If you manage your Next Design project and YAML files with Git, also refer to Git Integrity Check.

Installing the Package​

To prepare for using the YamlExchange package, install the YamlExchange package using the following steps.

Operating Procedure
  1. Install the [YamlExchange] package from [DENSO CREATE OFFICIAL] according to the following manual.
  1. After installation, restart Next Design, and the YamlExchange package will be available.
Prerequisites

To use the [YAML Exchange Settings] screen, Microsoft Edge WebView2 Runtime is required. If it is not installed, please install it.
For details on prerequisites, please refer to Installation Prerequisites.

Converting (Exporting) to YAML Format​

This exports the model selected in the Model Navigator and its sub-models to a YAML file.
The export destination is the Yaml folder located in the same folder as the project file. A dialog box asking for a save location will not be displayed.

Export Operation

Operation Procedure
  1. Open the target project in Next Design.
  2. Select the model to export in the Model Navigator.
  3. Click [Data] > [YAML] > [Export] from the ribbon.
  4. In the Completion dialog box, confirm the "Number of Output Files" and "Output Destination," then close the dialog box.
  5. Check the path of the exported file and any warnings in the Output tab (Category [YAML Exchange]) of the Info window.
caution

Files in the Yaml folder will be overwritten without confirmation.

Additional Information
Hint
  • The way the exported files are divided is specified on the [YAML Exchange Settings] screen. If not specified, the selected model and its sub-models will be combined into a single YAML file. If there are many sub-models, you can also split the files by model or class for export.
  • Even if you haven't specified how to split the files beforehand, selecting a model and converting (exporting) it will automatically add a setting to target that model for file splitting.
  • For details, see File Splitting (YAML Exchange Settings).

Processing YAML with AI​

Pass the exported YAML file to AI for analysis and editing.

  1. Pass the following files to AI.
  • Exported YAML file (the file at the path displayed in the Output tab)
  • Metamodel information file (nd.metamodel.yaml in the Yaml folder)
  • YamlEditGuide.md (Overview > YAML Editing Guide)
  1. Instruct the AI ​​not to change the id and class of existing models, and not to write an id to new models (only add a value starting with new- when referencing from within the same file).
  2. Overwrite the same file in the Yaml folder with the YAML file edited by the AI. Ensure the AI ​​returns the entire file with only one root. Overwriting with a file containing only the changed parts will erase the remaining content from the original file. Overwriting with a file containing an array of root will prevent import.
Supplement
caution
  • Do not rewrite or delete the values ​​of id and class. id is used to match existing models during import.

Importing Updated YAML into the Model​

Import the YAML file in the Yaml folder into the Next Design model.
You will not be asked which file to import. The system will locate the selected model in the main file of the Yaml folder and import only that model and its sub-models. Other models in the same file will not be imported, even if they have been edited in the YAML file.

Import Operation

Procedure
  1. In the Model Navigator, select the same model that was exported.

  2. From the ribbon, click [Data] > [YAML] > [Import].

  3. If you are asked about removing references not written in the YAML or deleting child models, select [Yes] or [No]. See Handling of Removed References and Deleted Child Models for details.

  4. In the confirmation dialog, check the files to import, the import destination, and the number of changes, then click [OK].

  5. Close the completion dialog.

  6. Check the import results, and if there are no problems, save the project (see Checking Import Results).

When the file selection dialog appears

If neither the selected model nor its submodels exist in the YAML file (e.g., models not yet exported, models created after export), the file selection dialog will appear.
In most cases, re-export the model and then import it.

Note
  • If the file displayed at the top of the confirmation dialog is not what you intended, click [Cancel].

  • The details of the changes and warnings are displayed in the output tab of the information window (category [YAML Exchange]), not in the confirmation dialog. To check, click [Cancel], then check the output tab and re-import.

  • Adding or removing associations between models under the selected model and models outside of it will also change the models outside of the selected model.

  • If a model written in the YAML is outside the selected model's hierarchy, that model will not be imported (a warning will appear in the Output tab). To import it, click [Cancel], select that model or its parent model, and then re-import.

  • Importing does not save the project. Review the results and save the project in Next Design.

For rules on matching and updating YAML elements with models, see Import Rules.

Handling of Removed References and Deleted Child Models​

A dialog box asking "Do you want to remove these?" (or "Do you want to remove/delete these?" if there are models to be deleted) will only appear if there are references not written in the YAML or child models not written in the YAML.

ButtonImport Method
[Yes]Removes references not written in the YAML (retains references written in the field at the opposite end of the relationship) and deletes child models not written in the YAML, along with their sub-models.
Do not select this option if you have a file where AI has only written part of it, as it will remove the references that were not written and delete the models that were not written.
[No] (Default)Does not change items not written in the YAML. This is usually the option to choose.
[Cancel]Does not import.

For details, see Import Rules > Handling of Unwritten Items.

Handling of Model IDs​

During import, the id (short ID) written in the YAML is used to decide whether to create a new model or update an existing model.

  • Models with an omitted id, or models with a temporary id starting with new-, will be created as new models during import.
  • Models with an id other than new- will update existing Next Design models that match that short ID. If no matching models exist, the import will be interrupted with an error.

When importing from an exported file in the Yaml folder, if a new model is created, the short ID calculated from the model's GUID is automatically written back to the id of that model in the YAML file.

This prevents duplicate models even if the same YAML file is imported again. The number of models written back is displayed in the completion dialog, and the files to which the IDs were written are displayed in the output tab.

The YAML file selected in the file selection dialog does not have the newly created model's short ID written back to it, so you must re-export it after importing.

If you undo the import or close the project without saving, the created models will disappear from Next Design. On the other hand, the YAML file describing that model retains the written-back shortened ID, so attempting to import it again will result in an error. In that case, delete the id line for that model in the YAML file, or revert the value to a temporary ID starting with new-, and then re-import.

Checking Import Results​

Checking LocationMainly Checkable Content
Model Navigator/EditorModels Created/Updated by Import
Output Tab in Information Window (Category [YAML Exchange])Export/Import Processing Results (Exported Files, Changes, Warnings, etc.)
Error ListWarnings/Errors When Modifying a Model by Import

If errors or warnings are displayed, please refer to Common Problems and Solutions.