SLW210 Posted July 7, 2023 Posted July 7, 2023 I have an in progress LISP and DCL, looking to have a button to save the drawing as a new drawing with a specific name into a specific folder (if folder doesn't exist create it and may need to be a sub folder created), the filename is an edit box with a combination of some edit boxes (filled in initially by attributes and fields comprise the third attribute) the folders would also be edit box information. First part of the path would be set i.e. M:\\Mxxxxx\\Settings\\Main Folder (eb18)\\Subfolder (eb19) \\Filename (eb20).dwg (I need the part in red from the edit boxes) and both folders could exist already as well as the filename, so need to alert if already a file in the folder without giving the option to overwrite, but to save as a revision or cancel. So in this example, hit save and the drawing is saved to M:\\Mxxxxx\\Settings\\2024-2025\\B Setting\\B Setting 2024-2025.dwg Quote
BIGAL Posted July 8, 2023 Posted July 8, 2023 Something like this, may need to do more than once check directory exists and then check if DWG exists. ; check that pdf directory exists (setq dwgpre (strcat (getvar "dwgprefix") "\pdf")) (if (= (vl-file-directory-p dwgpre) nil) (vl-mkdir dwgpre) ) If does not exist returns nil (findfile "M:\\Mxxxxx\\Settings\\2024-2025\\B Setting\\B Setting 2024-2025.dwg") Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.