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