AboutScott Cook Expertise I`ve been using AutoCAD since 1987 and programming AutoLISP nearly as long. I can answer questions about programming AutoCAD (except ARX) and production enhancement techniques. I cannot answer questions about AutoCAD crashes or DWG corruption. AutoCAD PROGRAMMING (menus, lisp) related questions only!
Experience Since 1987. Author of Plot2000 software for for AutoCAD, http://www.plot2000.com.
PROGRAMMING QUESTIONS ONLY PLEASE. Questions that are NOT related to programming or AutoCAD customization (menus and lisp only please) are outside the scope of my volunteer services and will NOT BE ANSWERED.
Question I have a block, "FORMAT" on a large group of drawings.
There is a non-attributed text entity,"PROJECT", within
that block, always in the same location. I need to drill
down and find the insert point of that text on each drawing.
The block "FORMAT" is inserted at different locations on each drawing. I know I can use this for a single extract:
(setq txt1 (tblsearch "BLOCK" "FORMAT"))
(setq txt2 (entget (cdr (assoc -2 txt1))))
(setq txt3 (cdr (assoc 10 txt2)))
But this does not return the correct text insert point. Using nentsel does not return the correct xy either. That only returns the pick point id.
I have a working batch routine that I can use to audit
multiple drawings, so that part is settled. I just can not figure out how to drill down to the xy location. I understand I may have to transform the xyz into a usuable point and maybe that is my problem.
Anyway I need to return that point so I can use it.
Thanks
Answer the xy of the insert is stored in a different coordinate, perhaps 11. I think 10 is perhaps the lower left corner. it is affected by the justification of the text. take a look at the DXF reference in autocad's help files. the justification mode is also stored.