Skip to content

[CadCraft] No interactive DIMSTYLE: typing DIMSTYLE errors, and space bar prevents JSON form at the command line #850

Open

Description

@ticket-craft

Description

Steps to reproduce:

  1. Type DIMSTYLE (or D, DST, DDIM) and press Enter.
  2. Try instead: dimstyle {"name":"Standard","DIMSCALE":240}

Expected:
DIMSTYLE opens a Dimension Style Manager dialog (or at least option prompts, like LAYOUT and SETVAR do), so users can change text height, overall scale, units, etc.

Actual:

  1. "invalid parameters for dimstyle: name is required"
  2. Space submits the command line at Command:, so the JSON form can't be typed. Result: DIMSTYLE runs alone (same error), then "unknown command dimstyle{...}". Ctrl+V pastes into the drawing, not the command line, so pasting doesn't work either.

The only working route for an interactive user is SETVAR DIMSCALE / DIMTXT / DIMLUNIT etc. one at a time.

Likely cause:

  • crates/engine/src/cmd/props.rs ~line 44: dimstyle has no .interactive(...) and run_dimstyle (~671) requires name.
  • The cmd {json} form in Session::input_line (crates/engine/src/lib.rs ~1231) is unreachable from the keyboard because cmdline.rs submits on space at non-text prompts.

Suggested fix:
Add a dialog (or prompts: Set current / New / Modify ) for DIMSTYLE, also menu Format > Dimension Style...; optionally let a line starting with " {" keep spaces until the closing brace.

Checked against main @ 00c7613.

Ticket details

App CadCraft
Reported by eljeffe (Discord username: eljeffe1023) — Discord user ID 735632114829099121
Submitted 2026-10-12 23:56:21 UTC
Discord server ArtCraft (1359579021108842617)
Submitted from channel 1558917176453374102
Submission ID TR-DZ864N2CXB

Submitted through Discord by eljeffe and created by the Ticket Relay integration on their behalf. The reporter may not have a GitHub account, so replies here will not reach them automatically.

Additional report #3079 requests an interactive Dimension Style Manager on Windows 11.

Activity

  1. Slopapalooza commented on Oct 13, 2026

    @Slopapalooza
    Contributor

    I'm working on this. Typing DIMSTYLE or using the Format and Dimension menus will open a Dimension Style Manager with the styles list, a preview, and Set Current, New, Modify, Override and Compare. -DIMSTYLE will give command-line prompts for scripts. It comes right after the Properties palette changes for dimensions; the engine side of those is #954.

  2. aiongg commented on Oct 19, 2026

    @aiongg
    Contributor

    From #1417 and #1459: users want text height, text and line colour, text and dimension line offsets, extension lines on/off, alternate units, symbols and arrows; on large drawings dimension text is unreadable without it (Windows 11). From #1301: the Dimension > Dimension Style menu item fails too.

  3. marked Dimension Style #1417 as a duplicate of this issue on Oct 19, 2026
  4. ticket-craft commented on Oct 22, 2026

    @ticket-craft
    Author

    Thanks! This ticket describes several separate problems:

    • DIMSTYLE has no interactive dialog or prompts
    • Space submits the command line, so the JSON form cannot be typed

    It helps a lot if each one has its own ticket, so they can be tracked and fixed separately.

  5. ticket-craft commented on Oct 22, 2026

    @ticket-craft
    Author

    Possibly related: #535, #126 and #381.

  6. FredApps commented on Nov 9, 2026

    @FredApps
    Contributor

    Related #1747 reports the same missing-name error when invoking DIMSTYLE from the menu or command line on macOS 26.7.1.

  7. FredApps commented on Nov 9, 2026

    @FredApps
    Contributor

    Related #2715 confirms the same DIMSTYLE and command-line JSON limitation in v0.17 on Windows; a SCRIPT file is a reported workaround. It also documents Ctrl+V being routed to PASTECLIP instead of command-line text.

  8. DoggyHU commented on Nov 12, 2026

    @DoggyHU

    Confirming this on the released Windows build, and one correction to the workaround suggested above.

    Environment

    • CADCraft 0.19.0 (227e3c385b20129cf525775e3d9cbe78b722b3bb), Windows x86_64, installed build
    • Same behaviour through cadcraft-cli 0.19.0

    1. The bug itself (confirms the report)

    Format › Dimension Style… and Dimension › Dimension Style… both print

    invalid parameters for `dimstyle`: `name` is required
    

    and no dialog appears. cadcraft-cli commands shows why: dimstyle (menu ["Format", "Dimension Style..."]) and dimstyle.dimension (menu ["Dimension", "Dimension Style..."]) are both interactive: false with params: {name, current?, <style fields…>} — name is required, and the menu binding passes nothing.

    2. SETVAR is not a working workaround

    The report above says the only route for an interactive user is SETVAR DIMSCALE / DIMTXT / DIMLUNIT. On 0.19.0 that does not change the dimension style:

    setvar {"name":"DIMTXT","value":500}
    setvar {"name":"DIMASZ","value":300}
    getvar {"name":"DIMTXT"}      -> 500        (reports success)
    

    Saving the drawing and reading the DIMSTYLE table back out of the resulting DXF (ground truth, not the UI) shows nothing changed:

                   dimtxt  dimasz  dimtsz
    Standard        0.18    0.18    0.0
    ISO-25          2.5     2.5     0.0     <- current style, unchanged
    

    SETVAR accepts and remembers the value but never applies it to the current dimension style — DIMASZ behaves the same. It looks like the DIM* names are recognised by setvar/getvar but not routed to the style, which fits the "not wired up" reading in the analysis above.

    3. The JSON form works, so the plumbing is there

    The command is functional as soon as it is given a name:

    cadcraft-cli run drawing.dwg \
      --cmd 'dimstyle {"name":"ARCH","dimtxt":250,"dimasz":0,"dimtsz":250}' \
      --save out.dwg

    Reading that DXF back:

    ARCH     dimtxt=250.0  dimasz=0.0  dimtsz=250.0     (and it becomes current)
    

    So styles can be created, edited and made current — only the interactive path is missing. (dimtsz > 0 also gives the architectural tick arrowheads, which is what most metric users want here.)

    4. A hint from a neighbouring dialog

    Format › Multileader Style… opens a fully working dialog (styles list, arrowhead size, text height, landing gap, landing length, text style) even though the mleaderstyle command is also interactive: false with a required name. If that dialog is already a generic style editor for these objects, wiring the dimension one to it may be a much smaller change than writing a Dimension Style Manager from scratch.

    Happy to test a build or a branch if that helps.

  9. lordofscripts commented on Nov 18, 2026

    @lordofscripts

    I can confirm this issue is still valid in v0.20. I am making architectural plans and tried to modify a style imported in the AutoCad file and there was no way to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions