(setq EntBlo (entmake (list
(cons 0 "BLOCK")
(cons 2 "SHEAR_DIAMOND")
(cons 8 BloLay)
(cons 10 InsPoi)
(cons 41 DimSca)
(cons 42 DimSca)
(cons 43 DimSca)
(cons 66 1)
)
)
)
thanks (again),
Rob
p.s. is there a good visual lisp book out there somewhere?
The entities that make up a block are defined in a BLOCK entity. To (entmake
..) a block, you (entmake ..) the BLOCK entity itself, then you (entmake ...)
the entities that go into the block, then you (entmake ...) an ENDBLK entity
(which really isn't an entity, it just signals AutoCAD that the block is
finished).
Of course, if the block is already defined you skip this step.
If you want to see the block in your drawing, which you essentially always do,
you need to create an insert of that block by entmake'ing an INSERT entity.
Your error message is telling you that you included DXF codes that are not
appropriate for a BLOCK entity. The appropriate DXF codes are covered in the
DXF Reference section of the help file. I don't have any simple code handy to
post, but perhaps someone else will do so.
Attributes introduce a complication. Typically, you (entmake ...) ATTDEF
entities during the block definition (first) phase. If the user ever inserts
the block using the INSERT command, these ATTDEF entities are used as
templates for the ATTRIB entities that go along with the INSERT entity of the
block.
When you (entmake ...) an INSERT with attributes, after entmake'ing the INSERT
entity you must immediately (entmake ...) each individual attribute and then
(entmake ...) a SEQEND entity to end the list of attributes. In this
scenario, there is never any reference to the ATTDEF entities in the block
definition. If (and _only_ if) the block will _only_ be inserted by using
(entmake ...), the ATTDEF entities inside the block definition are superfluous
and may be omitted.
jrf
Member of the Autodesk Discussion Forum Moderator Program
Please do not email questions unless you wish to hire my services
In article <ED2D2A82627BB23F...@in.WebX.maYIadrTaRb>, Rob Tomson
wrote: