cadamrao Posted May 25, 2010 Share Posted May 25, 2010 Hi Friends! Many times I recommended to my BOSS to purchase at least AutoCAD 2009; simply he smiling, but I’m facing problem to FIND & ZOOM the TEXT string from XREF (drawing file); XREF already BLOCK and attached with drawing. I need to match the TEXT string from XREF to drawing; so that I want to FIND & ZOOM the TEXT string from XREF. How to solve my problem in AutoCAD 2008? Anybody can help LISP! For this help will be greatly appreciated Thanks Amr Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 25, 2010 Share Posted May 25, 2010 Use Lee Mac's lisp routine. http://www.cadtutor.net/forum/showthread.php?t=46135&highlight=find+text You can buy him a beer too. Quote Link to comment Share on other sites More sharing options...
alanjt Posted May 25, 2010 Share Posted May 25, 2010 Wow, that text is tiny. Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 25, 2010 Share Posted May 25, 2010 Text? What text? I thought it was a line of ants marching away with my lunch! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 25, 2010 Share Posted May 25, 2010 My BFind program still has a few bugs to iron out, so I removed it from the forum until these are solved - however, a 'beta' version if you will, is posted here - its still not perfect, but will work 99% of the time I would think. Lee Quote Link to comment Share on other sites More sharing options...
cadamrao Posted May 26, 2010 Author Share Posted May 26, 2010 It's not work 99%;just I need to FIND&ZOOM,no need to replace the TEXT,MTEXT Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 26, 2010 Share Posted May 26, 2010 It's not work 99%;just I need to FIND&ZOOM,no need to replace the TEXT,MTEXT That doesn't mean the program doesn't work - it means it doesn't suit your requirement. Quote Link to comment Share on other sites More sharing options...
cadamrao Posted May 31, 2010 Author Share Posted May 31, 2010 Hi Still I didn’t get; anybody try this! Many times I recommended to my BOSS to purchase at least AutoCAD 2009; simply he smiling, but I’m facing problem to FIND & ZOOM the TEXT string from XREF (drawing file); XREF already BLOCK and attached with drawing. I need to match the TEXT string from XREF to drawing; so that I want to FIND & ZOOM the TEXT string from XREF. How to solve my problem in AutoCAD 2008? Anybody can help LISP! Just I need to FIND&ZOOM, no need to replace the TEXT, MTEXT ThanksAmr Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 31, 2010 Share Posted May 31, 2010 Why don't you try it? Oh, and I don't appreciate receiving personal messages requesting that I create your program - my time is voluntary, and I am in no way participating on this forum to serve your needs. Quote Link to comment Share on other sites More sharing options...
Cad64 Posted May 31, 2010 Share Posted May 31, 2010 Cadamrao, I have merged your two threads. Please don't start multiple threads asking the same question. Quote Link to comment Share on other sites More sharing options...
cadamrao Posted May 31, 2010 Author Share Posted May 31, 2010 Cadamrao, I have merged your two threads. Please don't start multiple threads asking the same question. ok;thanks! Quote Link to comment Share on other sites More sharing options...
cadamrao Posted June 1, 2010 Author Share Posted June 1, 2010 Why don't you try it? Oh, and I don't appreciate receiving personal messages requesting that I create your program - my time is voluntary, and I am in no way participating on this forum to serve your needs. ok;noted Thanks Quote Link to comment Share on other sites More sharing options...
Hangman Posted June 1, 2010 Share Posted June 1, 2010 So, just off the top of my head (coming from a guy who doesn't know LiSP very well), if I am understanding this correctly, Cadamrao needs to (writing suedo code) A Select a text string on an xref B Have the lisp search the current drawing for that string C IF the string is found THEN D center on that string and zoom into it E ELSE tell the user there isn't a string available. If that is correct, the biggest hurdle I would have would be selecting the string from the xref. After the string is assigned to a variable, you could search by (setq i -1) (setq SearchStrings (ssget "_X" '((0 . "TEXT,MTEXT")))) (while (setq Str2Search (ssname SearchStrings (setq i (1+ i)))) ... etc. I would assume you would use WCMATCH to match the string being search with the variable of the string from the xref. If WCMATCH returns T (true) Then ... get the coordinates of the Str2Search variable for VIEWCTR. setvar VIEWCTR to those coordiates and there it is in the middle of the screen. I'm just brainstorming here, I think it's good practice. You all can comment on my thought process and how far off the mark I am. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 1, 2010 Share Posted June 1, 2010 You cannot use ssget to search for entities nested within entities, you would need to look through the block definition as found in the block table - that is unless I have also misunderstood the request. If you are just searching the drawing file, then ssget will suffice. Selecting the text from the xref would make use of nentsel to force a nested selection. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.