Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
overlay blocks
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: overlay blocks (Read 1969 times)
0 Members and 1 Guest are viewing this topic.
aswin
Mosquito
Posts: 12
overlay blocks
«
on:
January 16, 2019, 12:13:47 AM »
hi.. Is there any way to place new blocks (overlay) on top of existing blocks without replacing..?
Logged
Abu Dhabi
renkor
Newt
Posts: 27
Re: overlay blocks
«
Reply #1 on:
January 23, 2019, 04:49:25 AM »
Hello all,
Any suggestions to this?
Logged
ronjonp
Needs a day job
Posts: 7531
Re: overlay blocks
«
Reply #2 on:
January 23, 2019, 09:35:49 AM »
Try this:
Code - Auto/Visual Lisp:
[Select]
(
defun
c:foo
(
/
_dxf e o p s
)
;; RJP » 2019-01-15
(
defun
_dxf
(
c e
)
(
cdr
(
assoc
c
(
entget
e
)
)
)
)
(
cond
(
(
and
(
setq
e
(
car
(
entsel
"
\n
Pick source block: "
)
)
)
(
=
"INSERT"
(
_dxf
0
e
)
)
(
setq
s
(
ssget
":L"
'
(
(
0
.
"insert"
)
)
)
)
)
(
ssdel
e s
)
(
setq
p
(
_dxf
10
e
)
)
(
setq
e
(
vlax
-
ename
->
vla-object
e
)
)
(
foreach
b
(
vl
-
remove
-
if
'
listp
(
mapcar
'
cadr
(
ssnamex
s
)
)
)
(
setq
o
(
vla-copy
e
)
)
(
vlax-invoke
o 'move p
(
_dxf
10
b
)
)
;; (entdel b)
)
)
)
(
princ
)
)
Logged
Windows 11 x64 - AutoCAD /C3D 2023
Custom Build PC
renkor
Newt
Posts: 27
Re: overlay blocks
«
Reply #3 on:
January 23, 2019, 01:29:58 PM »
Hello ronjonp,
It works perfectly, thanks!
Logged
ronjonp
Needs a day job
Posts: 7531
Re: overlay blocks
«
Reply #4 on:
January 23, 2019, 03:11:42 PM »
You're welcome!
Logged
Windows 11 x64 - AutoCAD /C3D 2023
Custom Build PC
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
overlay blocks