Swap Design Table File using VBA
Swap Design Table File using VBA
(OP)
Does anybody know how to swap a design table file using a macro?
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
Swap Design Table File using VBA
|
RE: Swap Design Table File using VBA
If you're doing it manually, wouldn't it be a bit simpler to create a parameter, and assign it to the configuration relaion in the design table?
In other words, create a parameter, make it integer, call it "ConfigNumber". Now, go to the "Relations" portion of the tree, drill down to your design table, expand the relations under it, until you find "Configuration." (Configuration=X) Create a formula on this parameter, and insert the new "ConfigNuber" parameter in the formula. Now, when you want to update it, no more opening the design table - just double click the parameter in the tree, change the number, hit enter, and wait for an update. Also, this should make it easier for you to automate, if you have the intention of doing so. (although I can't understand why, just based on your question)
I don't know if that's exactly what you're after, but I do hope that it helps.
---
CAD design engineering services - Catia V4, Catia V5, and CAD Translation. Catia V5 resources - CATBlog.
RE: Swap Design Table File using VBA
I have two excel files, lets say Example1.xls and Example2.xls. Curently my design table is linked to Example1.xls. I can change the file to Example2.xls by right clicking on the design table in the product structure, selecting properties, selecting the file path button, and select Example2.xls to replace Example1.xls.
What I would like to know is how to do that step using a macro.
I know it sounds silly to want to do this and not just add another configuration row, but for other reason not relevant here, this is what i would like to do.
Thanks for any help you can give.
RE: Swap Design Table File using VBA
Yes, at first glance, the idea does sound silly. But for the sake of adding value to your time, and any who might respond to you - please do elaborate on the macro issue...
---
CAD design engineering services - Catia V4, Catia V5, and CAD Translation. Catia V5 resources - CATBlog.
RE: Swap Design Table File using VBA
i'll try to elaborate:
I have a configured assy with parameters linked to a design table. this assy and design table are templates, starting position. This assy will be configured into a discrete assy per a customers order. The customers specs are written to an excel file with the same format as the template design table but saved with a different name, a customer specific name. i would like to be able to programaticlly swap the template design table with the customer specific design table and be able to save the product off discretely. This way our template doesn't grow exponentially with all the customer orders.
Plane and simple i would like to swap the excel file that the design table is linked to with another excel file using a macro.
RE: Swap Design Table File using VBA
Forgive me for being a clod; but what exactly is your vision for executing the macro? What is the event that triggers it?
---
CAD design engineering services - Catia V4, Catia V5, and CAD Translation. Catia V5 resources - CATBlog.
RE: Swap Design Table File using VBA
RE: Swap Design Table File using VBA
At this point, I'm not sure why it would be worth the trouble of writing a macro, vs. using the Edit -> Links -> Replace function. (seems like exactly the same amount of work - you could even make a desktop icon for the function)
Sorry to have such an exciting discussion, only to come back to such a disappointing answer...
---
CAD design engineering services - Catia V4, Catia V5, and CAD Translation. Catia V5 resources - CATBlog.