This functionality described here is only available at certain configuration levels. Info / Copyright

Engineering.SetParameterValueFromJsonFileCommand

Note:

This command can be used both in the Job Server environment with fileTrigger as well with a normal EEC installation.

Saves the contents of a JSON file as map in a parameter. The JSON file is transferred to the Job Server via FileTrigger.

The following variant of the command writes the contents of the specified JSON file into the parameter whose name is defined in the model variables. The parameter must be contained in the project component of the uppermost level.

Argument Type Description
jsonFile String Name of the JSON file.
Engineering.SetParameterValueFromJsonCommand("c:\json\parameter.json")

The following variant of the command writes the contents of the specified JSON file into the parameter whose name is defined in the model variables. The parameter must be included in the specified project component.

Argument Type Description
jsonFile String Name of the JSON file.
componentPath String Path to the project component.
Engineering.SetParameterValueFromJsonCommand("c:\json\parameter.json", "Feeder.Mechatronic.Feeder")

The following variant of the command writes the contents of the specified JSON file into the parameter whose name is transferred. The parameter must be included in the specified project component.

Argument Type Description
jsonFile String Name of the JSON file.
componentPath String Path to the project component.
parameterName String Name of the parameter.
Engineering.SetParameterValueFromJsonCommand("c:\json\parameter.json", "Feeder.Mechatronic.Feeder", "MyJsonData")

The following variant of the command writes the contents of the specified JSON file into the parameter whose name is defined in the model variables. The parameter must be included in the specified project component.

Argument Type Description
jsonFile String Name of the JSON file.
obj Object Project or project component.
Engineering.SetParameterValueFromJsonCommand("c:\json\parameter.json", «Feeder»)

The following variant of the command writes the contents of the specified JSON file into the parameter whose name is transferred. The parameter must be included in the specified project component.

Argument Type Description
jsonFile String Name of the JSON file.
obj Object Project or project component.
parameterName String Name of the parameter.
Engineering.SetParameterValueFromJsonCommand("c:\json\parameter.json", «Feeder», "MyJsonData")

More: