Excel-AutoCAD find/replace

Excel-AutoCAD find/replace

Anonymous
Not applicable
1,563 Views
5 Replies
Message 1 of 6

Excel-AutoCAD find/replace

Anonymous
Not applicable
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
0 Likes
1,564 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
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
0 Likes
Message 3 of 6

Anonymous
Not applicable
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.
0 Likes
Message 4 of 6

Anonymous
Not applicable
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.
0 Likes
Message 5 of 6

Anonymous
Not applicable
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
0 Likes
Message 6 of 6

Anonymous
Not applicable
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.
0 Likes