Visual Basic Customization

Reply
Contributor
ToddC
Posts: 18
Registered: ‎01-07-2004
Message 1 of 6 (345 Views)

Excel-AutoCAD find/replace

345 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
*JRWalker
Message 2 of 6 (345 Views)

Re: Excel-AutoCAD find/replace

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@jiveforum1.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
Contributor
ToddC
Posts: 18
Registered: ‎01-07-2004
Message 3 of 6 (345 Views)

Re: Excel-AutoCAD find/replace

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
Message 4 of 6 (345 Views)

Re: Excel-AutoCAD find/replace

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@jiveforum1.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.
Contributor
ToddC
Posts: 18
Registered: ‎01-07-2004
Message 5 of 6 (345 Views)

Re: Excel-AutoCAD find/replace

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
Contributor
ToddC
Posts: 18
Registered: ‎01-07-2004
Message 6 of 6 (345 Views)

Re: Excel-AutoCAD find/replace

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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community