Drawing Rule Fixer for AutoCAD (MCP)
====================================

Lets your AI assistant check the drawing that is open in AutoCAD against your company CAD standards and fix it in one go.
(日本語の説明は README-ja.txt をご覧ください。)


1. Install (about 2 minutes)
----------------------------
Claude Desktop (no settings file to edit)
(1) Download the extension file (.mcpb) from the page where you got this app. You do not need to unzip anything.
(2) Open Claude Desktop and go to Settings -> Extensions.
(3) Drag the .mcpb file onto that page, then press Install.
    (If dragging does not work: Advanced settings -> Install Extension... on the same page, and choose the file.)
(4) Start a new chat and ask "Which Drawing Rule Fixer tools can you use?" The AI lists them and you are ready.

Other AI clients (MCP settings)
(1) Unzip this file anywhere, for example: C:\Tools\drawing-rule-fixer
(2) Add the server to the MCP settings of your AI client (change the path to where you unzipped it; write each \ in the path twice).

    {
      "mcpServers": {
        "drawing-rule-fixer": {
          "command": "C:\\Tools\\drawing-rule-fixer\\py\\python.exe",
          "args": ["-m", "zumen_check.server"]
        }
      }
    }

(3) Quit the AI client and start it again.

You do not need to install Python. It is included in this folder.


2. Use
------
(1) Open a template drawing that follows your standards (or your CAD standards file, .dws) in AutoCAD and ask the AI:
      "Create a rules file at C:\CAD\rules.json from the open drawing"
    To try it right away, use the included sample-rules.json.
(2) Open the drawing you want to check in AutoCAD and ask:
      "Check the open drawing against C:\CAD\rules.json"
      "Show me what would be changed first"
      "Fix it to match the standard"
(3) One UNDO (Ctrl+Z) in AutoCAD restores the drawing. The drawing is never saved automatically.

To merge layers that have other names (for example "WALL" -> "A-WALL"), add them to "aliases" in the rules file.
To raise text that is too small, set "text_height_min" to your minimum text height.

You can also clean up drawings received from other companies. Ask the AI, and the options are added to the rules file:
      "Add to the rules: linetype scale 1, lineweight ByLayer, Z value 0"
      "Add to the rules: replace text style ROMANS-OLD with STANDARD, and dimension style OLD-DIM with DIM-100"
    After that, "check" and "fix" also cover linetype scale, lineweight, Z values and old text and dimension styles.

For civil works in Japan, you can also check layer names against the naming format of the MLIT CAD drawing standard, December 2025 edition (free).
      "Check this drawing with rules-mlit-civil-r7.json"
    The included rules-mlit-civil-r7.json lists every layer whose name is not "owner (S, D, C, M) - object code (TTL, BGD, BMK, STR, BYP, MTR, DCR, DOC, SUV, ORD) - free name",
    every ORD layer whose owner is not C, and every name longer than 256 half-width characters, each with the reason.
    To add this to your own rules file, ask "Add to the rules: check layer names against the MLIT CAD drawing standard, December 2025 edition".
    To move a layer to a name that follows the format, ask "Add to the rules: move layer WALL to D-STR-WALL", then "fix".
    To work on a whole folder of drawings (DWG and DXF) at once, ask like this (subscription):
      "Check all drawings in C:\Drawings\ProjectA against our standard"
      "Fix the drawings in C:\Drawings\ProjectA to our standard and save them in a folder named Fixed"
      "Translate the text of the drawings in C:\Drawings\ProjectA into English and save them in a folder named English"
    Fixed or translated drawings are saved in a separate folder under the same file names. The original files are not changed.
    (Drawings with nothing to change are not saved. A file that already exists in that folder is not overwritten.)
    If a drawing in the folder is open in AutoCAD right now, that one is skipped and you are told which.
    For DWG files, keep AutoCAD running (each drawing is opened and closed in turn; the drawing you are working on stays as it is).
    DXF files can be handled without AutoCAD running.


You can also translate the text in a drawing, or make its wording consistent.
      "List the text in this drawing"
      "Translate the drawing text into English and write it back. Show me what will change first"
      "Change 'CONC.' to 'CONCRETE' everywhere"
    Text, multiline text, block attributes, dimension text overrides and multileader text are covered. The same wording is replaced everywhere in one go.
    When a translation is longer than the original, add "narrow the single-line text that got longer" and single-line text and attributes are narrowed to fit.
    One UNDO in AutoCAD restores the text as well. DXF files are saved under a new name.


3. Free and subscription
------------------------
Free (one drawing at a time): checking a drawing, listing layers, listing text, previewing a fix or a text change, creating a rules file.
Subscription: fixing drawings, writing text back, and batch checking, fixing and translating a whole folder of drawings (DWG and DXF).

Subscribe: https://ai-pick.tech/autocad/zumen/
After subscribing, give the AI the license key shown on the purchase-complete page (once):
      "My license key is zcad_...... Please register it."
To cancel, change the card or get receipts, ask the AI "I want to manage my subscription" and it gives you the link.
The subscription check sends only the license key to the server. No drawing data is sent.


4. Help
-------
If something does not work, you lost your key, or you would like another check added, write to contact@gramshift.com.
The most requested items go into the next version first.
