lisp question

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Have you considered a simple command call to CHANGE to do the job?
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

luck.
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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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
--
http://www.DeliCAD.com - Applicatifs pour AutoCAD et IntelliCAD.
http://www.DeliCAD.com - AutoCAD and IntelliCAD add-ons.
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

entity
append
end
tried
luck.
Phillipe, your reply is precisely what I was looking for. much thanks, Tim
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.