Jump to content

Recommended Posts

Posted

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

 

 

 

TitleBlock.png

Posted

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

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...