Is it possible to call the saveas command with the dialog showing with the filename already set by a variable?
Have already tried (initdia)(command "saveas" "" "MyDrawing") and (initdia)(vl-cmdf "saveas" "" "MyDrawing").
If running from a new file the filename in the dialog is always populated as "Drawing1"
Solved! Go to Solution.
Solved by itmanagement. Go to Solution.
Look into the (getfiled) function, which has an argument for a default file name.
Thanks Kent. That does the trick if it can't be done direct from the command.
Only just got round to fully testing this. It accepts the variables but can't be used to save, only to open an existing file.
@macuma wrote:Only just got round to fully testing this. It accepts the variables but can't be used to save, only to open an existing file.
(setvar 'expert 5)
(setq fn (getfiled "Save drawing as" (strcat (getvar 'dwgprefix) var) "dwg" 1))
(command "_save" fn)
HTH