Author Topic: Combine 2 lisp (or a new one that does what both do)  (Read 1083 times)

0 Members and 1 Guest are viewing this topic.

nekonihonjin

  • Newt
  • Posts: 103
Combine 2 lisp (or a new one that does what both do)
« 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

BIGAL

  • Swamp Rat
  • Posts: 1396
  • 40 + years of using Autocad
Re: Combine 2 lisp (or a new one that does what both do)
« Reply #1 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)
A man who never made a mistake never made anything

nekonihonjin

  • Newt
  • Posts: 103
Re: Combine 2 lisp (or a new one that does what both do)
« Reply #2 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


ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: Combine 2 lisp (or a new one that does what both do)
« Reply #3 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...
« Last Edit: September 26, 2022, 11:55:35 AM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

nekonihonjin

  • Newt
  • Posts: 103
Re: Combine 2 lisp (or a new one that does what both do)
« Reply #4 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!