TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: nekonihonjin on August 10, 2022, 08:40:12 PM

Title: Combine 2 lisp (or a new one that does what both do)
Post by: nekonihonjin on August 10, 2022, 08:40:12 PM
Hey guys,
I found these excellent routines by Marko and Kerry, one generates a flatshot and inserts the block in the same place of the objects; while the other one allows to select objects to flatshot, instead of doing it with the whole drawing.

Could one of you be so kind as to indicate me the steps to follow, if this is possible to combine them, or what could be done to create one that does both functions?

thanks in advance.


https://www.theswamp.org/index.php?topic=33105.0

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/flatshot-insertion-point/m-p/5562259/highlight/true#M330928
Title: Re: Combine 2 lisp (or a new one that does what both do)
Post by: BIGAL on August 10, 2022, 10:37:13 PM
Just copy and paste into 1 file, the code has seperate defuns for the actions so your last 2 lines in new lisp are. Then just load, it will auto run.

(c:the correct defun to do 1st)
(c:the second defun to do)
Title: Re: Combine 2 lisp (or a new one that does what both do)
Post by: nekonihonjin on August 10, 2022, 10:48:14 PM
thanks for the reply BIGAL, makes perfect sense what you say if I wanted one action after another, but it's not the case, if I do it that way, I would have as a result a routine that opens the flatshot command and creates a block with the content of the whole drawing, located where the object is, and also a flatshot command that asks me to select objects and would create another block with only selected objects but located in a random place as the original flatshot command does.

I need that only once the command is invoked, and creates the block with only the selected objects AND in the place of the original objects.

I don't know if I explained myself well

Title: Re: Combine 2 lisp (or a new one that does what both do)
Post by: ribarm on September 26, 2022, 11:52:04 AM
You can temporarily use HIDEOBJECTS / ISOLATEOBJECTS command to make scene adequate for you snapshot with FLATSHOT command... After just type UNHIDEOBJECTS / UNISOLATEOBJECTS...
Title: Re: Combine 2 lisp (or a new one that does what both do)
Post by: nekonihonjin on September 26, 2022, 04:40:32 PM
You can temporarily use HIDEOBJECTS / ISOLATEOBJECTS command to make scene adequate for you snapshot with FLATSHOT command... After just type UNHIDEOBJECTS / UNISOLATEOBJECTS...

I hadn't thought of that Marko, but you're right, there is no need to create codes when you can reach your goal in a simple way.

Thank you!