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 > FIND text in XREF drawings! Possible?

AutoCAD - FIND text in XREF drawings! Possible?


Expert: Scott Cook - 4/23/2004

Question
Hello,

I use AutoCAD 2002 on Windows 2000 and I need to built a LISP routine to perform a "FIND" command (for text) in a drawing that's empty, containing just XREF'S.

Can be done? How? Where to start? I have little experience with AutoLISP but I learn fast! :)

Thanks,

Nicolae Baboi

Answer
I'm not even sure this can be done without spending an hour or so looking into it.
There is a possibility it can be done, but it's not a task that I would recommend for a beginner.
You will need to figure out how to iterate through all the entities in a block definition (xrefs are just a special kind of block), looking for the text of interest.
You will then need to look through the drawing and find inserts of that xref and indicate the location however you plan on doing it. Block contains the text in relation to the block's insertion point, so you would need to transform those coordinates for each occurence of it.

start by looking at the DXF reference in the BLOCKS section, and the entities section.


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.