fix(script): support AutoCAD .scr scripts with multi-line, single-line, and prefix handling

This commit is contained in:
yztink committed 2026-10-01 23:34:15 -07:00
1 parent ab0682153d
commit f32d0422d2
6 files changed
+222 -34

No files matched your search

+5
View File
@@ -113,6 +113,11 @@ impl OpenCADStudio {
Some(rest) => (rest.trim(), true),
None => (cmd, false),
};
let cmd = cmd.trim();
// AutoCAD command prefixes: '_' (international name), '.' (built-in name bypass)
let cmd = cmd.strip_prefix('.').unwrap_or(cmd);
let cmd = cmd.strip_prefix('_').unwrap_or(cmd);
let cmd = cmd.strip_prefix('.').unwrap_or(cmd);
let resolved = self.resolve_alias(cmd);
let cmd = resolved.as_deref().unwrap_or(cmd);
if is_spacemouse_command(cmd) {