Code Red > AutoLISP (Vanilla / Visual)

match properties for blocks

(1/5) > >>

stsevedallas:
I need a lisp or lisps to match properties for blocks.
When I select a "source block", I will select multiple destination
blocks to match scale, colors, linetype, rotation, text style,
etc...everything.
Thanks

Jürg Menzi:

--- Code: ---(if (setq SrcBlk (car (ensel "\nSelect source block: ")))
 (setq SrcLst (entget SrcBlk)
       SelSet (ssget "X" (list
                          (assoc 41 SrcLst) ;X-scale
                          (assoc 42 SrcLst) ;Y-Scale
                          (assoc 43 SrcLst) ;Z-scale
                          (assoc 50 SrcLst) ;Rotation
                          (assoc 62 SrcLst) ;Optional color
                          (assoc 6 SrcLst)  ;Optional linetype
                         )
              )
 )
)
--- End code ---
All other properties are not block specific...

stsevedallas:
I tried that code and it come back and says...
"no function definition: ENSEL"
It basically did not run.

Aside from that, I need it to keep allowing me to select destination blocks until finished (or cancelled like match properties)

Thank you for the reply.

GDF:

--- Quote from: stsevedallas on April 17, 2006, 05:14:08 PM ---I tried that code and it come back and says...
"no function definition: ENSEL"
It basically did not run.

Aside from that, I need it to keep allowing me to select destination blocks until finished (or cancelled like match properties)

Thank you for the reply.

--- End quote ---

typo, change ensel to entsel

Gary

Mark:

--- Quote from: stsevedallas on April 17, 2006, 05:14:08 PM ---I tried that code and it come back and says...
"no function definition: ENSEL"
It basically did not run.

--- End quote ---

Hint:
C:\< AutoCAD installation >\Help\acad_dev.chm

Navigation

[0] Message Index

[#] Next page

Go to full version