marcsellier Posted January 26, 2009 Posted January 26, 2009 Hello, I'm new here... I'm writing a macro in VBA into AutoCAD. I did a very big macro, but now I have a very big problem: - how can I find text or MText string in .dwg files (or .dxf also)? Exactly, I need to find automatically these strings in the drawing and save theme in a .txt file... There is some instructions or some command that can I use to do it? Any ideas? Thanks to all! Regards, Marc:D Quote
ReMark Posted January 26, 2009 Posted January 26, 2009 Any ideas? Yes. I did find a VBA macro that will extract text from an AutoCAD drawing and send it to an Excel spreadsheet. It was originally written for use with AutoCAD 2000. The routine, contained in a file called Textout.zip, can be downloaded here: http://www.homescript.com/autocad/ It's right near the top of the page. I also read somewhere that AutoCAD treats text just like an object. The way to handle it in VBA is by using strVariable = . I can neither confirm nor deny the info as I have never worked with VBA. Quote
ReMark Posted January 26, 2009 Posted January 26, 2009 Select text boxes (MText?) and send text to a file. A VBA routine. Click on this link: http://www.anteg.net/programming_handbook/acad.html You'll have to page down. It's on the left side. Quote
ReMark Posted January 26, 2009 Posted January 26, 2009 Extract block values (attributes) using the nifty program XTracta to just about any format (spreadsheet, database, document, etc.). However it is $99.95 (U.S.) for an individual license. Check it out here: http://www.anteg.net/programming_handbook/acad.html You'll have to page down to find it (XTracta). Quote
Lee Mac Posted January 26, 2009 Posted January 26, 2009 ReMark - I think you have a knowledge of the web that is beyond human... Quote
ReMark Posted January 26, 2009 Posted January 26, 2009 At the AutoDesk Discussion Groups forums re: Help regarding text extraction using VBA: http://discussion.autodesk.com/forums/thread.jspa?messageID=5867482 Quote
ReMark Posted January 26, 2009 Posted January 26, 2009 ReMark - I think you have a knowledge of the web that is beyond human... Thanks Lee. I'm just a ghost in the machine. And Lee, I think you have a knowledge of LISP that is far beyond your young age. Quote
ReMark Posted January 26, 2009 Posted January 26, 2009 Andy Dufresne: "I understand you're a man who knows how to find things." Quote
Lee Mac Posted January 26, 2009 Posted January 26, 2009 And Lee, I think you have a knowledge of LISP that is far beyond your young age. Haha thanks I think I've finally stopped stuttering and started to LISP Quote
ReMark Posted January 26, 2009 Posted January 26, 2009 OK knock it off. This ain't the Mac & ReMark comedy team. Go back to work. Quote
Lee Mac Posted January 26, 2009 Posted January 26, 2009 OK knock it off. This ain't the Mac & ReMark comedy team. Go back to work. Haha, just having some fun.... but Differential Calculus awaits.. Quote
ReMark Posted January 26, 2009 Posted January 26, 2009 Better you than me. I'm lucky I can remember how to add, subtract, multiple and divide. Anything beyond that I get a headache. LOL Quote
Lee Mac Posted January 26, 2009 Posted January 26, 2009 Better you than me. I'm lucky I can remember how to add, subtract, multiple and divide. Anything beyond that I get a headache. LOL Well, now we're into Term 2, I'm regularly getting a headache.... it seems we spend almost every lecture proving that 0x0=0... (it does doesn't it?) Quote
ReMark Posted January 26, 2009 Posted January 26, 2009 I don't understand why we don't have a book called Things That Have Already Been Proven. Then we could spend our time trying to solve things that haven't been proven. Why keep covering old ground? Don't we have enough new things to work on? Quote
Lee Mac Posted January 26, 2009 Posted January 26, 2009 I think we have to learn from the progressive accumulation of knowledge from the past 2000 years or so... so, we have to be taught the techniques of deduction that have evolved over such a long time. - It sometimes amazes me that we are learning over 2000 years worth of accumulated knowledge in around 2 years of lectures... But third/fourth years is where its at... then we start to move on to more interesting stuff - like the mathematics of chaos and the like Quote
Lee Mac Posted January 26, 2009 Posted January 26, 2009 I don't understand why we don't have a book called Things That Have Already Been Proven. I reckon you could make quite a bundle publishing a book like that... make it pocket-size so you could take it into exam halls Quote
ReMark Posted January 26, 2009 Posted January 26, 2009 Everything you want to know about chaos you can learn from a woman in about 20 minutes. Quote
Lee Mac Posted January 26, 2009 Posted January 26, 2009 Everything you want to know about chaos you can learn from a woman in about 20 minutes. True, true - and you also get the headache that comes with it Quote
ReMark Posted January 26, 2009 Posted January 26, 2009 OK young Einstein don't you have study hall in an hour? I'm expecting to see you back here some day after you've won the Nobel Prize for Physics. So hit the books! Quote
Lee Mac Posted January 26, 2009 Posted January 26, 2009 OK young Einstein don't you have study hall in an hour? I'm expecting to see you back here some day after you've won the Nobel Prize for Physics. So hit the books! Yeah I probably should be off now - enjoyed the banter Quote
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.