Load Linetype
linetype_loadLoad a single AutoCAD linetype safely via ActiveX, avoiding FILEDIA dialog deadlocks. Automatically picks the correct .lin file and verifies the linetype loaded.
Instructions
Load a single linetype safely.
Use this instead of system_run_command('_-LINETYPE _LOAD ...') — that
raw form deadlocks on the FILEDIA file-picker dialog and on the
-LINETYPE option-menu prompt (measured on AutoCAD 2026: it loads nothing
either way). This tool loads through the ActiveX Linetypes.Load member,
picks the right .lin file from MEASUREMENT, and verifies the linetype
actually loaded. Refuses a name that is not a valid symbol name, a file
outside the allowed paths, and reports a name the file does not carry
or a file AutoCAD cannot find as an error naming both.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Optional .lin file. Defaults to acadiso.lin (metric) or acad.lin (imperial), chosen from MEASUREMENT. Ignored by ezdxf backend. | |
| name | Yes | Linetype name to load (e.g. 'CENTER', 'DASHED', 'HIDDEN') |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||