Lisp Entmake Question

Anyone know where default attribute values are stored?

Using ENTMAKE, I'm wanting to insert a block, read the default value, manipulate the text based on the default value, then update the attribute text within the ENTMAKE'd block.

Any thoughts appreciated. (I'm in the process of perusing the help info, but I'm thinking this might not be covered there.)

Reply to
TomD
Loading thread data ...

Tom, In order to ENTMAKE an insert that has attributes, you need to know all that info already... (entmake (list '(0 . "insert") ....etc...... ); end insert entmake (entmake (list '(0 . "attrib") ......etc.....) ); end attrib entmake (entmake '((0 . "endseq")))

To do what I think you are trying to do, you need to use the (command "insert".....) method and then, if there's only one attribute, you could call (entget (entnext (entlast))) which returns the attribute dxf data, then use the (subst) and (entmod) functions.....

HTH, Jeff

Reply to
Jeff

Thanks for the response, Jeff. I had forgotten how to create complex entities. You're correct in what I was trying to do. I ended up doing the insert and modifying it afterward. It works fine, so I guess I'll leave it that way.

If anyone does happen to know if it's possible to access that info, I'd still be interested in finding out. It's not often I run across info that's so hard to access.

Thanks again for the response.

Reply to
TomD

Get the block from (tblobjname "block" "BLOCKNAME") Then you can step through the object using entnext to find the attribute you want. Once you have the correct attribute (cdr (assoc 1 ent)) will give you the default value

Reply to
Jim Claypool

Thank you very much, Jim. I figured there had to be something I was totally missing (tblojname).

Reply to
TomD

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.