REPLACE POINTS WITH A BLOCK

The Real JD

Usenet Archive
Joined
Jul 28, 2003
Messages
183
Reaction score
0
Does anyone have or know of a lisp routine to do this? TIA

and Happy New Year everybody!
 
Depends on the block. With or without attributes?

(entmake (list (cons 0 "INSERT")(cons 2 <block>)(cons 10 <insertion>)));etc.
layer is 8

Depends on the point, point or point list?

(setq cn 0)
(while (nth cn point_list)
(entmake (list (cons 0 "INSERT")(cons 2 <block>)(cons 10 (nth cn point_list)))) (setq cn (1+ cn))
)

MAPCAR? FOREACH? REPEAT?

Take your pick....
 
Happy New Year, JD.

Might you mean Softdesk Point blocks?
What's the game plan?
 
Just points... replace with block of my choice with no attributes! Thanks for the feedback so far.
 
Thanks! Seems to do the trick!

Jesús Padilla said:
This is a very rough program that I just finished

I hope this works for you.

JPadilla

(DeFun C:P2B ( / #PiPoi #PiBlk #LiBlk #InCon #EnPro)
(PrompT "\nSelect the Points")
(SetQ #PiPoi (SSGet (List (Cons 0 "Point"))))
(PrompT "\nSelect the Block")
(SetQ
#PiBlk (SSGet ":S" (List(Cons 0 "Insert")))
#LiBlk (EntGet(SSName #PiBlk 0))
#InCon 0
);SetQ
(Repeat
(SSLength #PiPoi)
(SetQ
#EnPro (EntGet(SsName #PiPoi #InCon))
#InCon (1+ #InCon)
);SetQ
(EntMake (Subst (Assoc 10 #EnPro)(Assoc 10 #LiBlk) #LiBlk)) (EntDel (Cdr(Assoc -1 #EnPro))) );Repeat (PrinC)
);DeFun
 

Latest threads

Back
Top