write_fixture_patch
Apply fixture patch changes to Vectorworks through Lightwright XML, supporting type swaps and corrections without Lightwright. Validates UIDs/fields and flags wattage mismatches.
Instructions
Apply field changes to fixtures via the Lightwright Data Exchange XML.
The MCP writes a Lightwright-style patch directly to the active XML. Vectorworks' file watcher picks it up on focus-in and applies the changes to the drawing — no Lightwright the application required in the loop.
Args: changes: list of dicts, each with: - "uid": dotted UID, e.g. "1246.1.1.0.0" - "fields": dict of XML field name → string value, e.g. {"Inst_Type": "Robe iForte LTX", "Symbol_Name": "Robe iForte LTX", "Wattage": "1250 W"}
Returns dict with: written_to, uids_changed, patch_size_bytes, warnings.
Safety: - Refuses Delete operations (the writer is patch-only; Delete is a separate operation we intentionally don't support). - Refuses unknown field names (catches typos before VW sees them). - Refuses UIDs not in the current snapshot. - Warns (does not refuse) if Inst_Type changes without Wattage — this is the 'frankenfixture' risk: new symbol but stale wattage.
To plan a type swap safely: 1. Call get_fixture_details(uid) to confirm target UID. 2. Call find_fixture_of_type(new_type) to get the correct Symbol_Name and Wattage strings. If count is 0, pre-place a fixture in VW first. 3. Call write_fixture_patch with Inst_Type + Symbol_Name + Wattage in the same change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||