lisp question

Dec 19, 2006 4 Replies

I wish to change a pline's linetype from "by layer" to "Hidden" with Autolisp. My problem is how do I introduce the group code 6 into the entity definition in such a way that entmod will recognize it. I have tried append and cons which get the dotted pair into the definition but always at the end or beginning and entmod refuses to update the definition. I have also tried subst to add in the group code along with group code 8 but again no luck. Could someone steer me in the right direction? Acad 2000, Thanks Tim


Have you considered a simple command call to CHANGE to do the job?

taiken a écrit :

hello,

there is no group 6 if the linetype is "bylayer" ... you must use append instead of subst :

(setq get (entget entity) get (append get (list (cons 6 "hidden"))) ) (entmod get)

"hidden" typeline must be loaded in the drawing

philippe

Good idea Mike --simple and straightforward-- in this instance I can use the change command. What I'm working on however will be better served by Phillippe's approach. I am drawing ductwork using an Autocad add on called Intelicad (note only one L). Its a great program by and large but I'm working on tweaking its ability to hide the duct in instances where one run is only partially hidden by the run above it. It involves exploding blocks representing the edges of each piece of duct, changing the resulting pline to linetype hidden then redefining the blocks to maintain consistency within the program. It will save me alot of drawing time once I get it working properly. Thanks for your reply. Tim

Phillipe, your reply is precisely what I was looking for. much thanks, Tim

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required