Jump to content

Recommended Posts

Posted
Is there a way to put the purge and bind at the beginning, then instead of savas is it possible to do a aectoacad. Not changing anything but the bind and purge will be done before aectoacad to the folder location.

 

Do you know what I mean by use AECTOACAD instead of saveas?

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • neekcotrack

    12

  • CAB

    10

  • borgunit

    1

Posted
I have not used that command.

http://discussion.autodesk.com/forums/thread.jspa?threadID=465456

 

You may give it a try.

 

Ok I got it to work.

 

(defun c:BindIt (/ LST VANS VDATE VDATESTR VDAY VDIA VDIR VECHO VMONTH VNAME VPREFIX VYEAR X)
 ;;  CAB 10/07/08
 ;; (splitdirs "c:\\123\\456\\789") returns ("c:" "123" "456" "789")
 (defun splitdirs (str / lst pos)
   (while (or (setq pos (vl-string-search "\\" str))
              (setq pos (vl-string-search "/" str))
          )
     (setq lst (cons (substr str 1 pos) lst)
           str (substr str (+ pos 2))
     )
   )
   (if (> (strlen str) 0)
     (setq lst (cons str lst))
   )
   (reverse lst)
 )

 (setq vDia     (getvar "filedia")
       vEcho    (getvar "cmdecho")
       vPrefix  (getvar "dwgprefix")
       vName    (getvar "dwgname")
       vDate    (rtos (getvar "cdate") 2 6)
       vYear    (substr vDate 1 4)
       vMonth   (substr vDate 5 2)
       vDay     (substr vDate 7 2)
       vDateStr (strcat vYear "-" vMonth "-" vDay)
 )

 ;;  remove the last 2 dirs
 (setq lst (reverse (cddr (reverse (splitdirs vPrefix)))))
 (setq vPrefix "")
 (mapcar '(lambda (x) (setq vPrefix (strcat vPrefix x "\\"))) lst)
 (setvar "filedia" 0)
 (setvar "cmdecho" 0)
 (initget "Bound Email")
 (setq vDir (getkword "\nSave file to [Email/Bound] <Bound>: "))
 (cond
   ((or (null vDir) (= "Bound" vAns))
    (setq vDir (strcat vPrefix "Bound"))
    (vl-mkdir vDir)
   )
   (t
    (setq vDir (strcat vPrefix "Email"))
    (vl-mkdir vDir)
   )
 )
 (if (vl-file-directory-p vDir)
   (progn
     ;;  The following is to create a seperate directory for each date
     (setq vDir (strcat vDir "\\" vDateStr))

     (cond
       ((and (null (vl-file-directory-p vDir))
             (null (vl-mkdir vDir))
        )
        (prompt (strcat "\nError - Could not create Folder: " vDir))
       )
       (t ; folder exist
        ;;(command "_.-exporttoautocad" "F" "2004" "" (strcat vDir "\\" vDateStr "-" vName))
        (command "_.-exporttoautocad" "F" "2004" "" (strcat vDir "\\" vName))
        )
     )
   )
   (prompt (strcat "\nError - Could not create Folder: " vDir))
 )
 (setvar "filedia" vDia)
 (setvar "cmdecho" vEcho)
(princ)
)

 

So if you have never used AECTOACAD it is something that building systems has. Like AutoCAD MEP 2009 . It converts 3D objects over to 2D objects so people with just regular CAD can use it.

 

Thanks again CAB!!!!!!!!!!

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...