TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: hcbn1997 on November 23, 2023, 12:13:17 AM

Title: Please edit the IMF lisp to merge the drawings,Please lisp to merge the drawing
Post by: hcbn1997 on November 23, 2023, 12:13:17 AM
I found a pretty good lisp to combine drawing files called IMF. However, Lisp has a disadvantage: the drawings will be connected to each other, the name frames will stick together. Now, I'd like to ask the experts to help me correct the distance for each drawing to be 1000, but it's a bit long to combine 30 drawings.
Or if anyone has a good lisp for merging drawings, please let me know, thank you everyone!
Title: Re: Please edit the IMF lisp to merge the drawings,Please lisp to merge the drawing
Post by: hcbn1997 on November 23, 2023, 12:13:53 AM
ĐÂY LÀ LISP IMF FILE LSP
Title: Re: Please edit the IMF lisp to merge the drawings,Please lisp to merge the drawing
Post by: hcbn1997 on November 23, 2023, 12:16:03 AM
THIS IS THE REAL SITUATION WHEN LISP HAS NOT BEEN CORRECTED
Title: Re: Please edit the IMF lisp to merge the drawings,Please lisp to merge the drawing
Post by: BIGAL on November 23, 2023, 01:15:10 AM
If you look at the code for the insert
(command "-insert"  (strcat pathname "/" filename)    (list xht yht)

You can see the insert point is a list of xht & yht.

So looking further in the code for the add to xht

Code: [Select]
xht    (+ xht (abs (car (mapcar '- p2 p1))))
Just add an extra 1000
xht    (+ xht 1000. (abs (car (mapcar '- p2 p1))))

Not tested !
Title: Re: Please edit the IMF lisp to merge the drawings,Please lisp to merge the drawing
Post by: hcbn1997 on November 23, 2023, 01:35:59 AM
If you look at the code for the insert
(command "-insert"  (strcat pathname "/" filename)    (list xht yht)

You can see the insert point is a list of xht & yht.

So looking further in the code for the add to xht

Code: [Select]
xht    (+ xht (abs (car (mapcar '- p2 p1))))
Just add an extra 1000
xht    (+ xht 1000. (abs (car (mapcar '- p2 p1))))

Not tested !
THANKS BRO, I WILL tested
Title: Re: Please edit the IMF lisp to merge the drawings,Please lisp to merge the drawing
Post by: hcbn1997 on November 23, 2023, 08:36:53 AM
If you look at the code for the insert
(command "-insert"  (strcat pathname "/" filename)    (list xht yht)

You can see the insert point is a list of xht & yht.

So looking further in the code for the add to xht

Code: [Select]
xht    (+ xht (abs (car (mapcar '- p2 p1))))
Just add an extra 1000
xht    (+ xht 1000. (abs (car (mapcar '- p2 p1))))

Not tested !
Lisp is great, thank you again
Title: Re: Please edit the IMF lisp to merge the drawings,Please lisp to merge the drawing
Post by: BIGAL on November 23, 2023, 05:58:21 PM
Just me I would not add in Model but rather make a new layout and insert into that layout. After all that is what layouts are about. Just need a Blank layout to copy.