Visual Basic Customization
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Excel-Auto CAD find/repla ce
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
213 Views, 5 Replies
03-16-2004 01:27 PM
Just my 2nd day working with VBA, but bare with me. I want to do a find and replace using AutoCAD and Excel. One column in Excel for the text to find on AutoCAD dwg, and another column to use for the replacement text. I've found some great projects on the internet linking AutoCAD and Excel, but I'm a long way off from actually doing what I want. Does anybody know of a similar program to do what I'm trying or can you point me in a direction?
Thanks
Thanks
*JRWalker
Re: Excel-Auto CAD find/repla ce
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-17-2004 11:08 AM in reply to:
ToddC
Have you got anything so far? Do you know VB at all? You will have to give
us a starting point.
JR Walker
"ToddC" wrote in message
news:33467741.1079472486355.JavaMail.jive@jiveforu m1.autodesk.com...
> Just my 2nd day working with VBA, but bare with me. I want to do a find
and replace using AutoCAD and Excel. One column in Excel for the text to
find on AutoCAD dwg, and another column to use for the replacement text.
I've found some great projects on the internet linking AutoCAD and Excel,
but I'm a long way off from actually doing what I want. Does anybody know
of a similar program to do what I'm trying or can you point me in a
direction?
>
> Thanks
Re: Excel-Auto CAD find/repla ce
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-17-2004 11:45 AM in reply to:
ToddC
I've been able to connect up to Excel from AutoCAD. I'm just not sure if a find/replace text is the route to go or if I should use attributes. I don't know how to read text from one cell to find on the drawing and then how to replace it with text from another cell on the drawing. I'm just learning VBA, but was hoping to find a similar program to the one I'm trying to write to get me started.
*JRWalker
Re: Excel-Auto CAD find/repla ce
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-18-2004 07:06 AM in reply to:
ToddC
If you are getting to the individual Excel cell objects, then you can pull
their values. Make sure the values are strings and then store the values of
the "before" and "after" values. If the objects are in AutoCAD and are just
text, create a selection set of all text and then cycle through them until
you find a matching "before" value and then change it to the "after" value.
Is this helping any?
JR Walker
"ToddC" wrote in message
news:18941100.1079552831971.JavaMail.jive@jiveforu m1.autodesk.com...
> I've been able to connect up to Excel from AutoCAD. I'm just not sure if
a find/replace text is the route to go or if I should use attributes. I
don't know how to read text from one cell to find on the drawing and then
how to replace it with text from another cell on the drawing. I'm just
learning VBA, but was hoping to find a similar program to the one I'm trying
to write to get me started.
Re: Excel-Auto CAD find/repla ce
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-18-2004 09:09 AM in reply to:
ToddC
I know exactly what your saying. I've connected up with excel, can put info from the drawing into it, but I haven't been able to go the other way from excel to the drawing to insert text. And then I'm not really sure how to find text and then change it in the drawing. I was also thinking about using attributes instead of text. Ideally I'd like to insert a block w/attributes, have the attributes loaded into excel, go into excel and place what I want the attributes to be, and then populate the drawing. I'm reading AutoCAD 2004 VBA by Joe Sutphin and it's really helping out a lot. I guess I just need to familiarize myself with VBA and then come back after I figure out what I can't do.
Thanks for your Help JR.
Todd
Thanks for your Help JR.
Todd
Re: Excel-Auto CAD find/repla ce
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-23-2004 12:50 PM in reply to:
ToddC
Yes, it is helping. I think I know what I have to do. It's just a matter of programming it. Thanks for your help.

