|
VECTO Input Manager
|
This document covers use cases for the Job Creator Tool (job command) when working primarily with XML files.
See also:
The user has XML component files and wants to create a new vehicle by selecting a vehicle type interactively and incorporating these existing component files. The tool validates that the components match the selected vehicle type, then guides the user through entering the remaining vehicle properties. The result is a complete VECTO job XML file with all components integrated.
Command example:
Assume the user would like to create a Heavy Lorry vehicle and has prepared several XML component files in the current folder:
The following command will start the interactive vehicle creation process, incorporating the existing components:
During the interactive session, the user is prompted to select the vehicle type from a list:
The user is then prompted for each required vehicle property. Depending on the required data type, the tool shows valid ranges or enumerated options. Example prompts:
Important: The -t vehicle flag disables interactive prompts for component data. However, for components that can appear multiple times (e.g., tyres for each axle, multiple powertrains), the tool will still prompt for the structure that holds these components (see the Interactive Mode Documentation).
For example, when creating a vehicle with multiple axles, you'll need to specify the axle configuration. The tool will then automatically assign the tyre components from the input files to each axle in file name order. Example prompt:
In the above input, we defined the two axles of the vehicle. The tool will then assign the tyre components from the input files to each axle in file name order.
After completing the interactive session, the tool generates the vehicle job XML file (output.xml).
The user would like to replace the Axlegear and its two tyres. The following files exist in the current folder: Tyre1.xml, Tyre2.xml, Axlegear.xml and Conventional_HeavyLorry.xml. The tool matches the vehicle type and components, and if there is an invalid input, it prints appropriate error messages and terminates. The result is a valid VECTO job XML where the input components have replaced the respective existing ones.
Command example:
After the command run, the modifiedvehicle.report.txt will display details of the execution. Example output (for a Conventional vehicle):
The user has a vehicle XML job file (Conventional_HeavyLorry.xml) that may have outdated component signatures or validation errors due to schema updates or manual edits. The user wants to recreate the vehicle using the latest schema and recalculate all component hashes to ensure integrity. The tool processes the file, updates all signatures, and reports any validation errors or hash mismatches in the output report file.
Command example:
The user has a complete vehicle XML job file (Conventional_HeavyLorry.xml) and wants to extract all components as separate XML files, then recreate the vehicle from a combination of the base vehicle structure and those components. This workflow demonstrates the basic cycle of extraction and reconstruction of vehicle job files using XML format for components.
Goal:
Command sequence:
This creates the file Conventional_HeavyLorry.json
This creates the files in the components folder: Components.Engine.xml, Components.Gearbox.xml, Components.TorqueConverter.xml, Components.Angledrive.xml, Components.Retarder.xml, Components.Axlegear.xml, Components.AxleWheels.Data.Axles[0].Tyre.xml, Components.AxleWheels.Data.Axles[1].Tyre.xml, Components.AirDrag.xml.
Final output is modified_vehicle.xml along with modified_vehicle.report.txt containing details of the operation. The recreated vehicle should be functionally identical to the original (if no changes were made), with updated component signatures.
The user has an existing vehicle XML file (Conventional_HeavyLorry.xml) and wants to quickly modify one or more specific properties without manually editing the file. The user specifies property paths and new values directly in the command line, and the tool applies these changes when generating the output file. This works for simple properties, nested values, and even array elements. Setting a property to null or "No" removes the entire object.
Command example:
The command modifies the Model property and a value nested in an array. To remove an entire object, set it to null or No.
Note: When modifying components that have valid signatures, the re-sign or clear validation action is required to allow modifications. Otherwise, an error will be raised.
The user has a vehicle XML file (Conventional_HeavyLorry.xml) and a component file (Tyre.xml) that should be assigned to a specific location in the vehicle structure. By default, the tool assigns components to the first matching location (e.g., first axle for tyres, first powertrain for engines). However, the user wants to assign the component to a different position (e.g., second axle instead of first). The user specifies the exact vehicle path using the -m parameter to override the default behavior.
Default behavior example:
Assuming a folder with these files:
Command:
Result:
As shown above, the tyre is assigned to the first axle (Axles[0]).
Explicit path assignment example:
To assign components to specific paths (e.g., second axle):
Command:
Result:
Now the tyre is assigned to the second axle (Axles[1]), while the first axle remains unchanged.