yamlexchange export
Exports the Next Design model to a YAML file.
If --out is omitted, it exports to the Yaml folder in the same folder as the project file, similar to the [Export] button on the screen.
The metamodel information file (nd.metamodel.yaml) is also exported to the destination. The metamodel information file is not exported if the profile is protected or in the Designer edition (Constraints > Export).
Returns (0) if the export was successful, (1) if it was successful with warnings, and (2) if it failed.
It also displays a message in the console notifying you of the command execution result.
Syntax
yamlexchange export --project <nproj>
(--model <id or path> |--all)
[--out <yaml or dir>]
[--ref-path <none|external|all>]
[--rich-text <sidecar|inline>]
[--clean]
[--report <path>]
Options
-
--project <nproj>(required)
Specifies the Next Design project file (.nproj). -
--model <id or path>
Specifies the model to export. Multiple models can be specified. (Specify either--modelor--all)
See How to write commands for details on how to specify models. -
--all
Exports the entire project. -
--out <yaml or dir>
Specifies the YAML file to export or the destination folder. (If--allis specified, or if multiple--modelare specified, they will be treated as folders.)
If omitted, it will behave as shown on the screen, and may add specifications to the configuration file (yamlexchange.ndycfg).
If specified, the configuration file will not be rewritten. If a folder is specified, a main file <model name>.yaml will be exported for each target.
If a name ending in .yaml is specified, it will be exported with that name (other names will be treated as folders).
If --all is specified, the name of the main file will be the project name (Exported File Structure).
-
--ref-path <none|external|all>
Specifies the range of model paths to be attached to references. Options arenone(no path),external(only references pointing outside the export range; default), andall(all references). -
--rich-text <sidecar|inline>
Specifies how rich text is exported. Options aresidecar(export as an HTML file in thecontentsfolder; default) andinline(embedded in the YAML body). -
--clean
Emptys the export destination folder before exporting.
If a filename is specified with--out, the folder containing that file is targeted. If--outis omitted, theYamlfolder is targeted.
All files under the export destination folder, including subfolders, will be deleted regardless of whether they were exported by yamlexchange or not. The items to be deleted will be displayed in a list beforehand.
Do not export to the same folder as project files, configuration files, or other documents.
--report <path>
The execution results will be written to a JSON file. See Execution Report for details.