Add command in Saveall.lsp

Add command in Saveall.lsp

Sandervp
Advocate Advocate
1,052 Views
3 Replies
Message 1 of 4

Add command in Saveall.lsp

Sandervp
Advocate
Advocate

Does anybody know if it's possible to add a command to the Express saveall lisp?

AutoCad must do this command (a lisp command) before it saves all the open drawings.

 

Or is it possible to create a lisp that will do this command for all the open drawings?

 

Thank U

 

 

0 Likes
1,053 Views
3 Replies
Replies (3)
Message 2 of 4

Luís Augusto
Advocate
Advocate

Using objectDBX you can execute commands and then save the file.
I must point out that for some commands there are restrictions.

See the example below:

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-a...

What commands do you need to perform?

 

Best regards, Luís Augusto

0 Likes
Message 3 of 4

Sandervp
Advocate
Advocate

Hello Luis Augusto,

 

I have got a lot of drawings. I need to make an e-transmit of all these drawings.

In the "savealll.lsp" I want to put an own command from another lisp file.

This lisp reloads all the unloaded xrefs, saves the drawing, creates an e-transmit, unloads the last reloaded xrefs and saves the drawing again.

The e-transmit is saved at the same folder as the drawing without the transmittal setupname "-standard" in the drawing filename.

 

 

(DEFUN c:EQ ()

(command "_xref"
"r"
"*")
(command "_qsave")

(command "_etransmit"

"_c"

(strcat (getvar "dwgprefix")

(substr (getvar "dwgname")

1

(- (strlen (getvar "dwgname")) 3)

)

"ZIP"

)

)
(command "_undo"
"3")

(command "_qsave")

(princ)
)

 

 

I've got also another lisp of this one, with the command "close" at the end.

 

I want to add the command "EQ" to the saveall lisp. It should be perfect if this lisp creates an e-transmit from all the open drawings, save all these drawings and close all these drawings.

 

Do the same with all the drawings in a specific folder (without opening every drawing) should be much better than perfect.

 

0 Likes
Message 4 of 4

Luís Augusto
Advocate
Advocate

I have not tested, but maybe this can help.

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-etransmit-all-open-file/m-p/606...

 

Unfortunately, objectDBX has some restrictions:

- No SelectionSets               (ssget, ssname, ssdel, etc) 

- No Command Calls               (command "_.line" ... etc)

No ent* methods                (entget, entmod, entupd, etc)  

- No Access to System Variables  (setvar, getvar, setvariable, etc) 

 

That way, the only way I know about making broadcasts is with the open document.

I hope the above topic can help you.

 

Best regards, Luís Augusto

0 Likes