File save format
The file save format can be selected from the following two types.
JSON format: A text-based file storage format in JavaScript Object Notation format. When comparing changes with the configuration management tool or difference comparison tool, you can visually check the changes. Suitable for development using configuration management tools such as Git.
Database format: Next Design's original binary file storage format. Since it is in binary format, you cannot visually check the contents of the file, but The file size is smaller than the JSON format.
caution
- If you select the JSON format, the access control list information set in the file when overwriting the project will be lost. If you are using information from an access control list and do not want to delete it, select the database format.
The correspondence between the file save format and the extensions of various files is as follows.
Various files | JSON format | database format |
---|---|---|
Project files | .nproj | .iproj |
Project template file | .nprot | .iprot |
Profile file | .nprof | .iprof |
Model file | .nmdl | .imdl |
Functions that depend on the file save format
For the following functions, the file save format of the target project and the file to be imported or referenced must match.
- Import model file
- Registration of model file reference
- Profile import
Output the name of the referenced model
As an optional setting when saving the file in JSON format, you can switch to output the name of the referenced model to the file.
By default, the name of the referenced model is not output. For example, if the subsystem "Control Core" references the function "Vehicle Speed Control", the reference relationship is saved in the model file as follows:
If you do not want to output the name of the referenced model
"Relations": [
{
"Id": "9f907a6d-ed5b-4925-a35b-2b1c9ac8769a",
"RelationType": "Ref",
"MetamodelId": "ab4dd11a-d7f2-42a1-af5f-8bb224879cc6",
"Metamodel": "Subsystem-to-feature reference",
"SourceId": "cd7f2f27-8271-457f-ac74-fff8ed190bbb",
"TargetId": "b25fd614-2bef-46ea-9590-fcb2d5a85307",
"TargetIndex": -1
},
],,
If you turn on the output of the name of the referenced model, the related reference source and referenced model name that was only Id will be output to the file.
When outputting the name of the referenced model
"Relations": [
{
"Id": "9f907a6d-ed5b-4925-a35b-2b1c9ac8769a",
"RelationType": "Ref",
"MetamodelId": "ab4dd11a-d7f2-42a1-af5f-8bb224879cc6",
"Metamodel": "Subsystem-to-feature reference",
"SourceId": "cd7f2f27-8271-457f-ac74-fff8ed190bbb",
"TargetId": "b25fd614-2bef-46ea-9590-fcb2d5a85307",
"SourceId $ Path": "/Design/Control Core",
"TargetId $ Path": "/Design/Vehicle Speed Control",
"TargetIndex": -1
},
],,
Operation procedure
- On the File> Information page, under Save Options, check the Include referenced model name (path) check box.
- Save the project.
Structured related models
As an option setting when saving a file in JSON format, you can switch to save the associated model (hereinafter referred to as related model) in a nested structure.
You can change the related model to be stored in a nested structure for each of the ownership-related, reference-related, and derived-related fields defined in the entity.
For example, if the subsystem "Control Core" refers to the function "Vehicle Speed Control", the model information of each other is stored in parallel as follows in the normal storage format.
For normal storage format
{
"Id": "b25fd614-2bef-46ea-9590-fcb2d5a85307",
"EntityType": "Entity",
"Name": "Vehicle speed control",
"MetamodelId": "69adf93c-b615-4611-b128-3d4f03e2ca90",
"Metamodel": "Feature",
"Fields": {
"Name": "Vehicle speed control"
}
},
{
"Id": "cd7f2f27-8271-457f-ac74-fff8ed190bbb",
"EntityType": "Entity",
"Name": "Control Core",
"MetamodelId": "da0449f7-79f2-444e-86c7-84bc8e38301d",
"Metamodel": "Sub System",
"Fields": {
"Name": "Control Core"
}
},
On the other hand, if you switch to save the related model in a nested structure, the model information of "Vehicle speed control" will be saved in the model information of "Control core" as follows.
When the related model is nested
{
"Id": "b25fd614-2bef-46ea-9590-fcb2d5a85307",
"EntityType": "Entity",
"Name": "Vehicle speed control",
"MetamodelId": "69adf93c-b615-4611-b128-3d4f03e2ca90",
"Metamodel": "Feature",
"Fields": {
"Name": "Vehicle speed control"
},
"OwnerId": "2e23a9e2-97fd-4177-ad82-96806c880ac5",
"OwnerId $ Path": "/Design"
},
{
"Id": "cd7f2f27-8271-457f-ac74-fff8ed190bbb",
"EntityType": "Entity",
"Name": "Control Core",
"MetamodelId": "da0449f7-79f2-444e-86c7-84bc8e38301d",
"Metamodel": "Sub System",
"Fields": {
"Name": "Control Core",
"Function $ Ref": [
{
"Id": "9f907a6d-ed5b-4925-a35b-2b1c9ac8769a",
"MetamodelId": "ab4dd11a-d7f2-42a1-af5f-8bb224879cc6",
"Metamodel": "Subsystem-to-feature reference",
"TargetId": "b25fd614-2bef-46ea-9590-fcb2d5a85307",
"TargetId $ Path": "/Design/Vehicle Speed Control",
"Index": -1
}
]
},
"OwnerId": "2e23a9e2-97fd-4177-ad82-96806c880ac5",
"OwnerId $ Path": "/Design",
"HasIncludeFields": true
},
Operation procedure
- In the Profile Navigator or Metamodel Editor, select the fields you want to save in a nested structure.
- Check the Structured and Saved check box on the Filelds tab of the Inspector.
- From the ribbon, click the [File]> [Information]> [Managing project files]> [Update project file] button to update the model file that is the target of the structural change.
- Save the project.
info
- Related model structuring can be used even if you do not output the name of the referenced model.
- If the name of the referenced model is not output, the following two lines will not be output in the above "When the related model is nested".
- "TargetId $ Path": "/Design/Vehicle Speed Control",
- "OwnerId $ Path": "/Design",
caution
- If you do not perform step 3 after changing the Structured and Save check box, model files that have not been edited will not be updated.
- After that, when an edit operation is added to the model file, the structuring of the related model is reflected and updated at the same time.