Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

E-Transmit zip File name with current date

12 REPLIES 12
SOLVED
Reply
Message 1 of 13
danglar
583 Views, 12 Replies

E-Transmit zip File name with current date

How can I do it? I wont to receive something like this after  e-transmit command invoked
"dwgname-curent date.zip"
example: building-16.11.14.zip
12 REPLIES 12
Message 2 of 13
hmsilva
in reply to: danglar

If I understood correctly, perhaps something like this:

 

(vl-load-com)
(defun c:demo (/ a)
  (setq file (strcat (getvar 'DWGPREFIX)
                     (vl-filename-base (getvar 'DWGNAME))
                     "-"
                     (menucmd "m=$(edtime,0,dd.mo.yy)")
             )
  )
  (command "_.etransmit" "_c" file)
  (princ)
)

 

Hope that helps

Henrique

EESignature

Message 3 of 13
danglar
in reply to: hmsilva

thank you! It work awesome but etransmit created in curent folder.. if is it posible how can i specify transmital folder
Message 4 of 13
hmsilva
in reply to: danglar


@apelbaum2014 wrote:
thank you! It work awesome but etransmit created in curent folder.. if is it posible how can i specify transmital folder

You're welcome.

 

If hard coded, change

(getvar 'DWGPREFIX)

to

"YourDrive:\\Your\\Transmital\\Folder\\"

If not hard coded, say something.

 

Henrique

 

 

EESignature

Message 5 of 13
danglar
in reply to: hmsilva

it work exelent but you have one case when programm stoped. In case when your dwg not saved yet. I make a litle change in your code in order to fix this problem.
vl-load-com)
(defun c:demo (/ a)
(command "save" "" "Y")
(setq file (strcat "C:\\0backup\\"
(vl-filename-base (getvar 'DWGNAME))
"-"
(menucmd "m=$(edtime,0,dd.mo.yy)")
)
)
(command "-etransmit" "_c" file)
(princ)
)
Message 6 of 13
hmsilva
in reply to: danglar



@apelbaum2014 wrote:
it work exelent but you have one case when programm stoped. In case when your dwg not saved yet. I make a litle change in your code in order to fix this problem.

What do you mean by 'dwg not saved yet', a new dwg, or a dwg already saved with a specific file name?
Henrique

EESignature

Message 7 of 13
danglar
in reply to: hmsilva

I mean if you not save your dwg before invoke regular etransmit function you are prompted to do it.. in opposite case you have not any problem with lisp

Message 8 of 13
hmsilva
in reply to: danglar


@apelbaum2014 wrote:

I mean if you not save your dwg before invoke regular etransmit function you are prompted to do it.. in opposite case you have not any problem with lisp


Perhaps

(vl-load-com)
(defun c:demo (/ file)
(command "_.qsave")
(setq file (strcat "C:\\0backup\\"
(vl-filename-base (getvar 'DWGNAME))
"-"
(menucmd "m=$(edtime,0,dd.mo.yy)")
)
)
(command "-etransmit" "_c" file)
(princ)
) 

 

Henrique

EESignature

Message 9 of 13
danglar
in reply to: hmsilva

Probably this code is more elegant?
(vl-load-com)
(defun c:et (/ a)
(command "_.qsave")
(setq file (strcat "C:\\0backup\\"
(vl-filename-base (getvar 'DWGNAME))
"-"
(menucmd "m=$(edtime,0,dd.mo.yy)")
)
)
(command "-etransmit" "_c" file)
(princ)
)
(c:et)
Message 10 of 13
hmsilva
in reply to: danglar

Probably...

 

Don't forget to localize the variable 'file' and remove the 'a' variable (I did)...

 

Henrique

EESignature

Message 11 of 13
danglar
in reply to: hmsilva

already done. Thank you Henrique.
Message 12 of 13
hmsilva
in reply to: danglar

You're welcome.

Glad I could help.

 

Henrique

EESignature

Message 13 of 13
igal1971
in reply to: hmsilva

small change ikn order to add more accuracy:
(vl-load-com)
(defun c:et (/ a)
(command "_.qsave")
(setq file (strcat "C:\\Your Storage Folder\\"
(vl-filename-base (getvar 'DWGNAME))
"-"
(menucmd "m=$(edtime,0,dd.mo.yy-H.MM)")

)
)
(command "-etransmit" "_c" file)
(princ)
)
(c:et)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost