Function Entry: LOADDIALOG
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: LOADDIALOG
Name
`loaddialog`
Class
DCL Function
Syntax
(load_dialog dclfile)
Arguments and Values
dclfile: DCL pathname string. AutoCAD: "DCL file to load. If the dclfile argument does not specify a file extension, .dcl is assumed."
Description
Loads a DCL file and returns a dialog-resource identifier.
Return Values
An integer: a positive dialog-resource identifier (dclid) on success, the handle later passed to NEWDIALOG and UNLOADDIALOG; on failure, an integer that is not positive.
The two vendor references, verbatim:
- AutoCAD (loaddialog reference page): "Type: Integer – A positive integer value (dclid) if successful, or a negative integer if loaddialog cannot open the file."
- BricsCAD (DCL "Typical usage sequence" page; its LISP function table only says "Load a DCL file"): "by calling loaddialog with the path to a dcl file as argument (loaddialog "c:/mydialog.dcl") -> return value 1 If the return value is 0 or less, then the file could not be loaded."
Difference: they agree that success is a positive integer. For failure,
AutoCAD says NEGATIVE, while BricsCAD says "0 or less" – BricsCAD treats 0
as a failure, AutoCAD never mentions 0. A portable program tests
(> dcl_id 0) for success; an implementation returns a negative integer on
failure, which satisfies both.
Side Effects
Loads external dialog definitions into the host dialog subsystem.
Availability
- AutoCAD 2026: documented (per Autodesk reference page).
- BricsCAD V26: presumed compatible (no contradicting page found).
- Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.
Source Notes
- [Function Sequence to Display and Work with a Dialog](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP/files/GUID-FD32ADB3-F16E-42AA-BD37-53259B824AAB.htm)
- [loaddialog (AutoLISP/DCL), AutoCAD 2026](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP-Reference/files/GUID-B5E4E72B-BD59-4E5E-8FBF-345DFC45A7EC.htm) – the return-value wording quoted above.
- [Typical usage sequence, BricsCAD V25 DevRef](https://developer.bricsys.com/bricscad/help/en_US/V25/DevRef/source/dcl_usage.htm) – the BricsCAD wording quoted above (same text since V14).
- [Supported LISP functions, BricsCAD V25 DevRef](https://developer.bricsys.com/bricscad/help/en_US/V25/DevRef/source/LISP_Functions.htm) – "Load a DCL file", no return value.
- Status: documented in the DCL workflow documentation.
clautolisp (implementation deviation)
clautolisp returns a positive integer for every successfully loaded file, starting at 1 in a fresh process, and -1 when the file cannot be opened or parsed – within both vendors' rules. Deviation, until clautolisp 2.2.222: the first successful call of a process returned 0, which AutoCAD's rule does not allow for a success and BricsCAD's reads as a failure; fixed in 2.2.223 (clautolisp-load-dialog-first-id-is-zero).