Ask and answer engineering questions

Learn from millions of experts

Feed

What's causing my equations to break? (Relation defined out of context)

By chris on 01 May 21:01 2 answers 2 comments

What am I doing wrong here? I did some digging but I can't find the right answer. I'm working on a modular shelving system made out of wood. It's a multi-body part, and I've set up my equations with global variables so that if we decide to change from 3/4" thick wood to 1/2" thick, for example, as one would expect from global variables, I can just change that one, and it populates the rest of the part. Works fantastic...when it works.

But randomly they just seem to break. For no reason.

For example, in the first flagged equation (see pic) "D1@3' 6" rail" it equals "woodThickness". But the error says that it's "relation defined out of context". How's that? There's no outside influence. This is a master part. All for the variables are in this, just one, part file.

And if you look right below it at "D3@skecth8", it's also defined with the variable "woodThickness" and it's fine. What gives?

I even tried to go back to the extrusion that's creating the equation "D1@3' 6" rail" and retype in the global variable but it tells me that the "Equation entered is invalid". That same variable works everywhere else.

Thoughts? I'm going nuts here. These variables are exported to help feed child parts (which, by the way, "woodThickness", the same variable exported from this, works just fine in another part.

Thanks in advance,
Shields

Added images

Square Square

2 answers

  • Robert H.
    Robert H. 6 months ago

    Without having the model open and able to play with, I'm suspicious of the extra "quote mark" in the middle of the dimension name. You want to indicate 'X inches' but Solidworks is interpreting that quote mark as the end of the dimension name.

    Try changing the dimension and feature names such that they don't use [ ' ] and [ " ] and reserve the quote marks for just the beginning and ending of the name, e.g. "D1@3ft6in rail" and see if that fixes it.

  • chris
    chris 6 months ago

    Robert,

    You're my friggin' hero! That fixed it. Now that you say that, my problems started surfacing intermittently after i went back and started naming features to keep things organized!

    Thank you very much!

Add your answer to: "What's causing my equations to break? (Relation defined out of context)"

Save Cancel