I need to use the configuration name in equations to drive other variables. What is the global variable name that I can read this from? I have been digging for literally hours on this!
You can try: $PRP:"SW-Configuration Name"
If configuration name has numbers only, try to link specific configuration name to custom property and then custom property to GV in equation.
Yes to both counts, Krzysztof & Vladimir.
Unfortunately, my configuration name has a dash in it. When I take it to the equation side, it evaluates it as an expression.
ConfigurationName TEXT $PRP:"SW-Configuration Name" Evaluates as: 204011-1
ConfigNm ="Configuration Name" Evaluates as: 204010
What I really want to do is this:
SpringLayer =RIGHT ("Configuration Name",1) Evaluates as: 1 (Actually evaluates as 0)
In excel, I would do this: =RIGHT(TEXT("Configuration Name"),1) How to do this in SW?
Unfortunately there is no way for SW to read dash as a symbol in equation manager.
I would try to split specific property into two separated properties - before dash and after dash and reverse links: instead of linking Configuration Name to Specific Property, link concatenated Specific Properties to BOM.
Now you can link simplified specific properties (with no symbols included) to GV equation manager.
Yes, that is apparently the case. Unfortunately, I cant split up the configuration name prior to the configuration manager. Unless there is a way to do it in properties?? I tried using commands there, and it did not seem to work. I'm open to other ideas. I just need that last character from the configuration name to go into a GV.
You could use a macro, then embed the macro as an equation. Embed and Auto-Run SolidWorks Macros In Your Models! - YouTube
That way you can read the config name in as a string.
Bjorn Hulman wrote: You could use a macro, then embed the macro as an equation. Embed and Auto-Run SolidWorks Macros In Your Models! - YouTubeThat way you can read the config name in as a string.
Bjorn Hulman wrote:
SW broke this undocumented ability several releases ago.
OK, my bad. There goes my next party trick
If use the configuration name with symbols as driving variable I do not see the way to link it to equation manager.
This is why I use Custom Properties and/or Global Variables as driving variables to create part numbers in BOM
Maybe I need to clarify what I'm doing. I am trying to make an assembly that is a coil, and is composed of several sheets. When you coil the sheets together, all of the sheets are then different geometrically. Creating the coild with a sweep, and varying each sweep with offsets, driven by the last digit in the configuration name, which is the "layer number". Since we have many different part numbers of varying numbers of sheets, material, and width, I am trying to make a process that is as automated as possible. So, what is different here is I am trying to drive an offset value basesd on the configuration name. So, all I have to do is update a pattern, which is also driven by a GV, and then the name drives the geometry.
This is the last detail in the entire model that needs a solution. Everything else is ready to go.
Rodney Martin wrote: I am trying to drive an offset value basesd on the configuration name.
Rodney Martin wrote:
I am trying to drive an offset value basesd on the configuration name.
Thy to drive the offset value from Global Variable
In that case, does the config specific props option not work? You can use excel functions to split the configuration name into as many props as you need. After that you can either link the config specific property to the dimension directly, or link it to a GV and then link the GV to the dimension.
Which part do you need the left side, right side or the whole config name with/without the dash?
You could do as Vladimir suggested by writing it to a config specific custom prop., and set a new column in the design table to merge left and right without the dash. 'Config name' could also be a separate custom prop which would be left up to dash and you could have another that is 'Spring layer' as you describe above. You then can link the config specific property to the equations.
*Edit: so long as you don't need '-' you can create the config prop(s). and then you can use $PRP@'Config prop.'. in the design table
I was using the last character of the configuration name to drive the offset, because the 123456-1 is our normal naming convention for parts such as this.
My other intention was to make this as simple as possible, and to have only one place to go when you want to update/create a new spring assembly. I was using the equation manager as the one place to go to make all of your updates, because the EM has a nice comment field that can be used to explain each user input variable. If I get this to work like I want, all you need to do is select the number of layers, and then all of the geometry would be driven based on that, and automated in all other ways, config name being one of those inputs for the automation. All I need is that last character, and for it to be driven from the configuration name.
ahh, I now see your problem, I thought you were using a design table.
I have no problem using the design table. I just need to get this in there, and wont have to touch it again since its just a calculation. I have gotten into the DM, so can you put a GV into one? I could do this there if it would let me.
The equation manager can only evaluate a numerical value including some excel like functions, the custom properties can't evaluate anything that looks like an equation (the closest being something like "d1@sketch1" x "d2..."...). Ideally what you want is to write the config name to a series of config properties, then either link directly to the dimension(s) that you want to modify or set it to an equation to then drive the dimension. I think a design table or driveworks (I've not used it) would be the only other options.
I've said config name to custom properties, but you could work the other way around, create your config names based on the dimensions input into the design table.
Yes, I would be very happy to send just the digit(s) after the dash ("-") to my GV. I have no idea how to do that at this point. Properties do not allow functions (right()), and I do not see that the design table part of configuration, only a part of the parent. Thus, its not returning different valves based on different configs.
Have a look at this file.
*edit: You could also use $Value@'Equation name'@Equations to go direct from the design table to the equation
Did you watch the video I posted? It embeds a macro into the equation manager so acts like an equation would. The macro would be relatively simple and would perform the function you describe.
Retrieving data ...