Entmake in Lisp
I am trying to place some ATTDEFs from a point in my drawing, but it puts them on (0,0) every time. What is wrong with this code ? Do I miss something or is the order wrong?
(entmake
(list
(cons 0 "ATTDEF")
(cons 1 "S3BA-100100BV")
(cons 2 "CODERING")
(cons 3 "Onderdeelcode")
(cons 7 "ISO")
(cons 8 "$attribs")
(cons 10 att_insp)
(cons 40 1.0)
(cons 50 0.0)
(cons 70 0)
(cons 72 1)
(cons 74 2)
))
(entmake '((0 . "ENDBLK")))
point att_insp is (2000.0 1250.0)
Jeroen
Comments
-
Since the justification is MC you have to supply the alignment point (gc 11). Note: gc 10 is also required but any point will do.
0 -
Even when I use the next code AND set OSMODE to 0 it puts the ATTDEF @ (0,0)
(setq entlist
(list
(cons 0 "ATTDEF")
(cons 100 "AcDbEntity")
(cons 8 "$attribs")
(cons 100 "AcDbText")
(cons 10 att_insp)
(cons 40 1.0)
(cons 71 0)
(cons 72 1)
(cons 1 "ca-bltext")
(cons 7 "ISO")
(cons 100 "AcDbAttributeDefinition")
(cons 3 "Onderdeelcode")
(cons 2 "CODERING")
(cons 70 0)
(cons 73 0)
(cons 74 2)
))
(entmake entlist)0 -
I tried to use the same order as in one of my other lisp-files. but still point (0.0 0.0 0.0) is used for the placement.
(setq entlist
(list
(cons 0 "ATTDEF")
(cons 8 "$attribs")
(cons 10 att_insp)
(cons 11 '(0.0 0.0 0.0))
(cons 40 1.0)
(cons 71 0)
(cons 72 1)
(cons 1 "ca-bltext")
(cons 7 "ISO")
(cons 3 "Onderdeelcode")
(cons 2 "CODERING")
(cons 70 0)
(cons 73 0)
(cons 74 2)
))
(entmake entlist)0 -
SOLVED IT:
(setq entlist
(list
(cons 0 "ATTDEF")
(cons 8 "$attribs")
(cons 10 att_insp)
(cons 40 1.0)
(cons 41 1.0)
(cons 71 0)
(cons 72 1)
(cons 1 "ca-bltext")
(cons 7 "ISO")
(cons 3 "Onderdeelcode")
(cons 2 "CODERING")
(cons 11 att_insp)
(cons 70 0)
(cons 73 0)
(cons 74 2)
))
(entmake entlist)0 -
@Roy Klein Gebbinck said:
Since the justification is MC you have to supply the alignment point (gc 11). Note: gc 10 is also required but any point will do.Thanks for pointing me to the right direction...
0 -
More information if you are interested:
https://goo.gl/nrkJmC0