Yes, that is where I run into problems as I get "Cannot write to directory:
(defun c:aecexport ()
(setq d (rtos (getvar "CDATE") 2 6)
;get the date and time and convert to text
yr (substr d 1 4)
;extract the year
mo (substr d 5 2)
;extract the month
day (substr d 7 2)
;extract the day
);setq
(setvar "filedia" 0)
(setq filepath (getvar "dwgprefix"));gets drawing path
; sets export path
(if (findfile (strcat filepath "\\2010_version\\"))
(setq export_path (strcat filepath "\\2010_version\\"));; if true
(vl-mkdir (setq export_path (strcat filepath "\\2010_version\\")));; if not
)
(setq export_dwg_name (getvar "dwgname")); sets drawing name
(princ (strcat export_Path "\n"))
(SETVAR "CMDECHO" 0) ; suppress command line
(command "-aecexporttoautocad"
"f"; Format
"2010"; Year
"b" ; Bind xrefs - Yes/No
"y" ; Yes Bind
"t" ; Bind type=Bind/Insert
"b" ; Bind
"s" (strcat "-" yr "-" mo "-" day) ; YYYY-MM-DD
"" (strcat export_path export_dwg_name)) ; drawing path and name
(setvar "filedia" 1)
(setvar "CMDECHO" 1) ; turn command line on
(princ)
)
Command: AECEXPORT
C:\Users\Dave.Mahoney\Documents\\2010_version\
File format: 2010
Bind xrefs: Yes
Bind type: Bind
Filename prefix: ACAD-
Filename suffix: -2016-10-25
Cannot write to directory:
The folder is created in the correct location but cannot be written to.
The path that is highlighted might have something to do with it but I am not sure why.
Regards
Dave