| Commands | CAPCAD_FILE_TOOLS (list a folder's files) · CAPCAD_PICK_FILES (file picker) · CAPCAD_PICK_FOLDER (folder picker) |
| Shortcuts | none. There is no alias in CapCad's acad.pgp for any of the three |
| Ribbon | CapCad tab › CAD Utilities panel › Tools split button › File tools (CAPCAD_FILE_TOOLS). CAPCAD_PICK_FILES and CAPCAD_PICK_FOLDER have no button |
| Category | CAD Utils: Segment (CAPCAD_FILE_TOOLS) · CAPCAD_PICK_FILES and CAPCAD_PICK_FOLDER: none |
| Form | FileToolsForm — CAPCAD File Tools, modeless, one reused instance. The two pickers have no form of their own: they open the Windows dialogs |
| Hosts | AutoCAD only (and Civil 3D). On ARES Commander CAPCAD_FILE_TOOLS is not available in this version and says so; on BricsCAD, GstarCAD and ZWCAD none of the three is available |
Three small utilities that keep Explorer out of the way. One lists a folder's contents inside the CAD, in a panel the text comes out of copied or saved; the other two open the Windows dialogs and hand the choice back to whoever called.
- The folder listing becomes text. Names only, or full paths — ready to paste into a spreadsheet, a script or a batch field.
- Filter by extension.
dwg,jpgor any extension you type;*brings everything. - Copy and save in one click. The result panel has Copy all and Save….
- The form stays open. It is modeless: you change folder and list again without leaving the drawing.
- File picking for automations.
CAPCAD_PICK_FILESandCAPCAD_PICK_FOLDERare the bridge to scripts: they open the native Windows dialog and write the result into a system variable any AutoLISP can read.
CAPCAD_FILE_TOOLS — list a folder's files
Opens a small, modeless form with a path, an extension and a button. Clicking the button lists that folder's files in a text window.
No screenshot on this page.
FileToolsFormonly exists with the CAD open. The table below describes the controls by the caption they show.
| Control | What it does |
|---|---|
| Path | The folder to list. It can be typed or pasted. While the text is not an existing folder, the field's background stays red and List files is disabled. |
| ... | Opens the Windows folder picker and fills the Path field. |
| Ext. | The extension, without the dot. The list offers dwg, jpg and *, but the field is editable: type pdf, csv, whatever you need. * (or empty) lists everything. |
| Complete path | Unticked (the default), the output carries file names only; ticked, it carries each one's full path. |
| List files | Reads the folder and opens the result window. It only enables when the path exists. |
The sweep is first level only: sub-folders are not visited.
The result window
The result opens in a modal window titled Files, with the text in a monospaced font, read-only, and scroll bars both ways. It carries three buttons:
| Button | What it does |
|---|---|
| Copy all | Sends the whole text to the clipboard and confirms in the status bar. |
| Save… | Opens the Windows save dialog (.txt, .csv or anything) and writes the text. |
| Close | Closes the window. The File tools form stays open behind it. |
A path that stops existing between the typing and the click, or an invalid extension, stops with the system's error message in a CapCad box — the list simply does not open.
CAPCAD_PICK_FILES and CAPCAD_PICK_FOLDER — the Windows dialogs
These are bridge commands. They do nothing to the drawing: they open the Windows dialog and write the choice into the system variable USERS3, so that another program — a script, an AutoLISP routine, a CapCad command — can read the result from there.
Today they are the supported way to ask a user for a file or a folder from an automation.
How they are called
Each command asks for one line of arguments separated by pipes (|). The line is read with spaces allowed, so everything after the command name goes into a single parameter.
CAPCAD_PICK_FILES Label|Extension|InitialDir|AllowMultiple:
default on Enter → Select files|*||1
CAPCAD_PICK_FOLDER Label|InitialDir:
default on Enter → Select folder|
From an AutoLISP routine:
(command "CAPCAD_PICK_FILES" "Pick the drawings|dwg|C:/Projects/Section1|1")
(setq picked (getvar "USERS3")) ; "C:\\...\\a.dwg|C:\\...\\b.dwg" or "" if cancelled
CAPCAD_PICK_FILES, field by field
| Field | What it does |
|---|---|
| Label | The dialog's title. Empty: Select files. |
| Extension | Builds the filter. * or empty gives All files (*.*); any other text gives two filters — <EXT> files (*.ext) and then All files. |
| InitialDir | The folder the dialog opens in. Forward slashes are converted to back slashes. |
| AllowMultiple | 0 turns multiple selection off. Any other value — including empty — leaves it on. |
The result is each file's full path, separated by |. Cancelling writes empty text into USERS3.
CAPCAD_PICK_FOLDER, field by field
| Field | What it does |
|---|---|
| Label | The description text of the folder picker. Empty: Select folder. |
| InitialDir | The pre-selected folder, if it exists. Unlike the file picker, this one does not convert forward slashes — give it back slashes. |
The dialog carries the new folder button. The result is the folder's path with a trailing back slash (C:\Projects\Section1\). Cancelling writes empty text.
Remembered between sessions
Nothing. FileToolsForm always opens with an empty path and the extension dwg, and the two pickers write no preference at all — only the USERS3 variable, which belongs to the current drawing and does not survive closing the CAD.
Notes
- Three-letter extensions catch more than you asked for. The
*.dwgfilter is resolved by Windows, which for extensions of exactly three characters also returns files whose extension begins with the text — aplan.dwg1shows up in adwglisting. Use*and read the list when that matters. - The listing does not go into sub-folders. To sweep a whole tree, list folder by folder.
USERS3is a CAD variable, not a CapCad one. Any other command or routine can overwrite it. Read it immediately after calling the picker.USERS3holds text and its length is limited. A selection of dozens of long paths may not fit whole; in that case pick by folder rather than by file.- Cancelling and "picking nothing" are the same thing. Both commands write empty text when you cancel — including when you cancel the argument prompt, before the dialog even opens. Always test the result before using it.
- The command line is the only report. Neither picker writes anything to the drawing, and neither says on screen what it captured.