Help to Combine 2 Lisp Routine into One

Help to Combine 2 Lisp Routine into One

pewpewx
Participant Participant
565 Views
8 Replies
Message 1 of 9

Help to Combine 2 Lisp Routine into One

pewpewx
Participant
Participant

Hello,
I'm looking for a way to combine LISP routines. I've found a few single routines but would like to combine them. I know how to use them, but not write them. Anyone could help me to combine these two Lisp file? (attached) ?

azlangmtc_0-1661391999201.png

 

please help i attached all lisps below

 

0 Likes
566 Views
8 Replies
Replies (8)
Message 2 of 9

paullimapa
Mentor
Mentor
Please clarify combine...
Do you want to just copy & paste both into a single lisp file?
Do you want to have one run after the other?
Do you want to have them as sub routines?
Let us know exactly what operation you are trying to fulfill with them.

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 9

pewpewx
Participant
Participant

i want this to lisp run as one lisp.
1)sent.lsp - is using for  Detach unloaded/unresolved xrefs, Bind xrefs, Audit, Purge 
2)GetFiles.lsp - An analog of the 'getfiled' function for multiple file selection.
example like etransmit. and the reason i want using this 2 lisp is because it more straightforward than etransmit and just pick multiple dwg and bind. doesnt have to select/unselect or check/unchecked in transmittal. my english not so good on explanation. i hope you can understand what i mean . thanks😅

0 Likes
Message 4 of 9

paullimapa
Mentor
Mentor

Perhaps you would like to try the free AutoScript app?

AutoCAD Script Pro 64 bit - { Cadig AutoScript } - Freeware

Just write a script file that calls Sent.lsp and then use AutoScript to select the drawings you want to apply the script file to.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 9

pewpewx
Participant
Participant

Thanks for your advice and I appreciate it but i more prefer this routine in lisp. it will be nice if someone can combine this two lisp routine into one routine. and i not very familiar with scripts routine😅

0 Likes
Message 6 of 9

Kent1Cooper
Consultant
Consultant

If I'm reading things right, the SENT command does its work within an individual drawing file.  If the GetFiles... function selects multiple files that all need SENT applied in them, then something other than a combined AutoLisp file will be needed, because an AutoLisp routine cannot start in one drawing and continue in another.

Kent Cooper, AIA
0 Likes
Message 7 of 9

paullimapa
Mentor
Mentor

@Kent1Cooper is exactly right which is the reason you would just create a script file and use AutoScript to apply it to all the selected drawings. Script files are easy to write. They basically contain a sequence of commands you would actually type in at the AutoCAD command line. In this case it would be something like:

(load”sent”) 

sent

Then just save the file with a .SCR extension like SENT.scr and you are set to go. This assumes AutoCAD can find SENT.lsp to load else the script file’s first line will need to include the entire path to SENT.lsp which is exactly what you would need to do to run SENT in the current drawing. 

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 8 of 9

pewpewx
Participant
Participant

actually the idea to combine this 2 routine comes after I started off with a lisp that I found online that was created by Lee Mac to either freeze or thaw layers on multiple drawings (attached). it really will be more straightforward than etransmit and just pick multiple dwg and bind. doesnt have to select/unselect or check/unchecked in transmittal. 

0 Likes
Message 9 of 9

paullimapa
Mentor
Mentor

this other Lee Mac routine uses ObjectDBX which is another development tool to execute commands on other drawings without actually opening them. Your SENT.lsp will not work because that is not using ObjectDBX.  So if you think SCRIPT is hard to learn, try diving into ObjectDBX...

Perhaps you can contact Lee Mac and he can help you out here.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes