Jump to content

VBA, search text or MText in AutoCAD


Recommended Posts

Posted

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?:geek:

 

Thanks to all!

 

Regards,

Marc:D

  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

  • ReMark

    12

  • Lee Mac

    8

  • marcsellier

    1

Popular Days

Top Posters In This Topic

Posted

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.

Posted

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

Posted

ReMark - I think you have a knowledge of the web that is beyond human... :shock:

Posted
ReMark - I think you have a knowledge of the web that is beyond human... :shock:

 

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

Posted

Andy Dufresne: "I understand you're a man who knows how to find things."

Posted
And Lee, I think you have a knowledge of LISP that is far beyond your young age.:)

 

Haha thanks :D

 

I think I've finally stopped stuttering and started to LISP :thumbsup:

Posted

OK knock it off. This ain't the Mac & ReMark comedy team. Go back to work.

Posted
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.. :(

Posted

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

Posted
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?)

Posted

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?

Posted

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

 

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 :thumbsup:

Posted
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 :thumbsup:

Posted

Everything you want to know about chaos you can learn from a woman in about 20 minutes.

Posted
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 :P

Posted

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!

Posted
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 :P

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...