I am new to design tables. I have a simple design table linked to a part. The design table has two configurations - one configuration with all features active and another configuration with a few features supressed.
Everything works fine when switching between the configurations *in Solidworks*.
However, I want to change which configuration is active *in Excel* and then open the solidworks file.sldprt and see the part displayed in the new active configuration.
SolidworksApi macros
I am not sure this is possible. I think that the "default" configuration is the first one listed, but I don't think that you can change configurations via the design table, just define them.
I guess I could be wrong. I have been wrong before....I know because..this is generally what it looks like.
It's looking like you're probably right, unfortunately. I am trying to develop a system where a non solidworks user can modify a spreadsheet and then generate a new model and print based on the desired configuration *as selected outside of solidworks in a spreadsheet*. It works if the "configurable" data are dimensions in a single configuration, but yes it looks like the table in excel is only a storage medium an interactive device when it comes to changing from one config to another.
correction:
it looks like the table in excel is only a storage medium and NOT an interactive device when it comes to changing from one config to another.
Eric,
For a design table inside of a part use this ...
$configuration@part_name
For a design table in an assembly use this ...
$configuration@component_name<instance>
inside of a part:
Ok so if I use $configuration@part_name
then I can specify a different part name to any configuration that exists...but that doesn't necessarily allow me to make one or the other configuration active while using only excel.
The Design Tables only allow you to control the dimensions, suppression states, etc. of the various configurations. They do not have anything to do with the "active" configuration.
I am not a macro or API person, but I'd be willing to bet that someone can get you setup where a non-SWX user can make their choices in a spreadsheet and it trigger or link to a macro or API that selects which configuration is made active.
Have you looked into DriveWorks? It might be just what you need.
How does one turn on a faucet from the fuse box?
Will this change the active configuration of a part that is being driven by the excel table?
If so, can you show me how it works? Because I can't picture it.
Now that I think of it, maybe I can picture it. You do bring up a good point.
If you have a linked body from another part inside your current part, I think that you can use the commands that has given you to change the configuration that is being used by the linked part INSDE your current part.
Same thing inside an assembly, you can change the configurations of individual components using Keith's method.
This might be a way to get what you wanted.
I would like to ask a similar Question if I may. How do I Change active configuration without Opening the part? Can I do it from EPDM by any Chance? My (not so critical) issue is that I've released a couple of parts but they were saved in a compressed state which means, as the step files were generated, they use the active configuration i.e. the compressed state.
I would like to Change the active configuration so that I can generate the step file from EPDM without having to work on the file and Change ist Revision etc. Anyone know how to/if you can do this?
Eric,
I think the issue is trying to work without SolidWorks. Excel can drive SolidWorks, but it will always need to call an active instance of SolidWorks or create one [i.e. Set swApp = CreateObject("SldWorks.Application.27")]. It will be using a license when it does, so it has to be a SW user.
I know you can set-up SW configurations to be view-able in eDrawings. Then a nonSW user could access available configurations, but they'd never be able to make new ones.
Dennis is correct in that you can trigger a SW macro from Excel, but you have to give the user access to SW.
Set swApp = CreateObject("SldWorks.Application.27")
swApp.Visible = True '(if it doesn't show)
Set ModelDoc = swApp.OpenDoc(bld & Workbooks(nam).Sheets(sht).Range("A" & u).Value & ".SLDASM", 2)
FileName = "[MACRO FILE PATH]" & "CustomProps.swp"
boolstatus = swApp.RunMacro(FileName, "CustomProps1", "InterferenceModelSheet_xlsx")
swApp.CloseDoc (Workbooks(nam).Sheets(sht).Range("A" & u).Value & ".SLDASM")
The only options I can think of are more licenses or an open work station that a person could remote into to generate the files you want. They don't have to know how to use SW if your macro does all the work in Excel. The down side is if you have too many users who need access at the same time.