diff --git a/README.md b/README.md index ae0736b..f730993 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,43 @@ This tool transforms tag properties in JSON files by replacing the first value in the `tagProps` array with a path based on the element's name, an MCM number, and a device type. -## Usage +## MCM Folder Organization + +The tool can also organize tags according to MCMs (Master Control Modules) in your Ignition project. This process will: +1. Process all MCM folders in your Detailed-Views directory +2. Update view.json files with proper tag paths +3. Generate a consolidated tags.json file with all MCM tag structures + +### Usage for MCM Organization + +```bash +python process_tags.py "C:\Program Files\Inductive Automation\Ignition\data\projects\YOUR_PROJECT\com.inductiveautomation.perspective\views\Detailed-Views" -o "outputs" +``` + +Replace `YOUR_PROJECT` with your actual Ignition project name. + +### Example: + +```bash +python process_tags.py "C:\Program Files\Inductive Automation\Ignition\data\projects\MTN6_SCADA\com.inductiveautomation.perspective\views\Detailed-Views" -o "outputs" +``` + +This will: +1. Scan all MCM folders in the Detailed-Views directory +2. Process each view.json file in the MCM folders +3. Update the view.json files with proper tag paths +4. Generate a consolidated tags.json file in the outputs directory + +### Output Structure + +The generated tags.json file will contain: +- All MCMs from your Detailed-Views folder +- Properly organized tag structures for each MCM +- Merged tags for MCMs that have multiple folders (e.g., MCM02 with both "Fluid Inbound Merges 5-7" and "Fluid Inbound Upper") + +## Single File Transformation + +For transforming individual JSON files: ```bash python tag_transformer.py [device_type]