Design Table Problem

Howdee group,

I have an assembly for which the geometry of individual parts is updated through design tables. The overall dimensions of the assembly always change, so I've devised a system to automatically update the parts as required: I use one "master" excel table to calculate the overall geometry of the assembly and individual parts, and then run a VB program which goes through all the parts to open each part's design table in order to update/pass information from the master excel table (when each design table is opened, it automatically updates from the master table and thus the part is updated). This works pretty well, except now I would like to make the parts generic so that one part can be used for different assemblies (which would be defined by different master tables).

The problem I now have is that the design tables of each of the parts refer to the original master table I made for the first assembly. I can replace the excel references in each part, but then I would need to duplicate the parts for each new assembly design, and I would rather just keep one version of each part.

Is there a way of creating some type of global variables which can (1) be updated from excel, and then (2) read by a part's design table when it is opened?

- I suppose this might be more of an excel than a SW question...

Thx a bunch.

Reply to
Dave V
Loading thread data ...

Have you thought of controlling all your parts from 1 externally linked design table? This is built in functionality. You could repoint the parts to new externally linked tables fairly easily from within the parts or with a simple VB script.

I may not completely understand the depth of what you have accomplished. It seems that you are jumping through some unnesasary hoops.

Cadguru

Reply to
cadguru

Thanks for your reply Adam.

What you've describe is essentially what I do now (I just described it in a bit more detail than maybe was necessary). I did make a VB script to automatically re-point all the parts - essentially just a search/replace of the path and filename for the external xls file.

I guess I was trying to think of a more "elegant" solution - the VB script takes quite a while to update all the parts as there's a good number of them and they are relatively complex. I still have to open each part's design table before it updates anyway (VB script does that too), so I suppose it doesn't take that much more time to for the program do the string replace.

I'm curious how others might have approached this problem.

Cheers, David V.

Reply to
Dave V

I haven't tried this, but can you change Excels external links to point to a different spreadsheet? I've done this manually but not through a program. Might be worth a try.

Tony

Reply to
Tony

Yes you can. This works well...

Dim ExcelSht As Worksheet Set ExcelSht = ExcelObj2.ActiveSheet retval = ExcelSht.Name ExcelSht.Cells.Replace What:=findstring, _ Replacement:=replacestring, LookAt:=xlPart, MatchCase:=False Set ExcelSht = Nothing

David.

Reply to
Dave V

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.