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

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).