DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Display Current File Name after Save or SaveAs

Started by bdeck, August 13, 2025, 11:06:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bdeck

This is a simple macro to replace DC's "Save" and "Saveas" commands.
Unlike the DCv31 commands, it answers a simple question:

     "What DC drawing file am I now editing ?"

1a) Before the save, it reports whether the file has changed since prior save. Allows ESC to exit Save.
1b) After a Save or SaveAs (or no action at all) it displays the current file name in the DC title bar.
2) It allows saving under more than one name.
3) If user saves under multiple names, the most recent will be the current file name.

PS: Alternatively, in Version 31, touching the Space Bar (then ESC) after a save will update the file name in the title bar.


'' aa.d3m

'' Save or Save-as with immediate feedback in drawing title
'' Use ESC in Save dialog to exit without saving.
'' Macro will allow multiple resaves, but does not undo an unwanted save.

if sys(998)=0 then
Message "Note: File has not changed since Previous Save."
endif
savit=1
do while savit>0
savit=0
>SaveAs
{
<incomplete
}
path$=sys$(2)  ' most recent saved file path/name (sys$(3) for name only)
print path$    ' complete path and file name will appear on status line
name$=sys$(3)  ' File name will appear in input dialog
Prompt$= "File Name  =    "+name$+"            Blank, Zero, ESC, or ENT = OK as is             NonZeroNum+ENT = Save Again"
INPUT [prompt$], savit
loop
end



Modified 8/25/25 to also print full path on status line