AllExperts > AutoCAD 
Search      
AutoCAD
Volunteer
Answers to thousands of questions
 Home · More AutoCAD Questions · Answer Library  · Encyclopedia ·
More AutoCAD Answers
Question Library

Ask a question about AutoCAD
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scott 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.
 
   

You are here:  Experts > Computing/Technology > Computer-Aided Design > AutoCAD > AutoCAD non-attributed text within a block

AutoCAD - AutoCAD non-attributed text within a block


Expert: Scott Cook - 6/11/2007

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.

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.