Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking an equation value to a Property Field 1

Status
Not open for further replies.

Nella95

Mechanical
Nov 21, 2005
400
I'm pretty certain this is possible - I just haven't found the right path yet... How do I link an equation value - for example - 'Total Length' - to a part's property? I know how to add 'Total Length' as a lone value, but I want to link the Description field = STUD,'A'X'B'X'Total Length'
 
Replies continue below

Recommended for you

So you want the value of a custom property to be driven by several dimensions/variables in the model?

Unfortunately, with standard SW functionality, you can drive a custom property by an equation, but only if the result of the equation is a number. Concatenated strings are not possible. You will need to use VBA in an equation to set the value. There's a SolidWorks World presentation on that by Josh Brady.

-handleman, CSWP (The new, easy test)
 
What about a design table? You can drive the dimensions using the DT, then have one of the cells concatenate those dimensions into your description.
 
Yeah, DT is gotta be the answer - and concatenated fields. Gotcha.
 
Just beware that the DT fields won't update unless you open the design table. If you change your model geometry in a way that would affect your concatenated values, you will need to open the design table to update the property.

-handleman, CSWP (The new, easy test)
 
Yeah, I learned that the hard way - Thanks.
 
With something like this, though, that really shouldn't be a problem. The only way the description should change is if any of the dimensions change. And the only way the dimensions can change is by editing the DT.
 
The problem with driving those dimensions by a design table and locking model edits to the table is that often this kind of information (looks like overall length/width/thickness/etc.) is a driven dimension controlled by the design and functionality rather than a driving dimension. Updating the design table can be cumbersome in these kinds of situations. Using VBA in an equation is a bit more difficult to set up, but updates with every rebuild.

-handleman, CSWP (The new, easy test)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor