Skip to main content
StephenW
23-Emerald III
April 2, 2012
Question

flexible component with limits

  • April 2, 2012
  • 2 replies
  • 1001 views
I'm trying to figure out if I can put limits on a flexible component. I want my flexible component to be limited to say 24" to 36". If it falls outside of that range, I would like it to generate an error message of some sort.

Anyone have any amazing suggestions?


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

2 replies

23-Emerald IV
April 2, 2012
You should be able to simply write some relations that will limit the valid values for the dimension. This won't necessarily warn the user, but will prevent the model from becoming something that is not allowed. Another approach is to use restricted parameter values. If you attempt to set a restricted parameter to a value outside the specified limits it will throw an error. The third option is to generate a false constraint. This will throw an error message to the user as well.

Value Limiting Example:
IF LENGTH < 24
LENGTH = 24
ENDIF
IF LENGTH > 36
LENGTH = 36
ENDIF

Restricted Parameter Example: (See "About Restricted Value Parameters" in the help documentation)
{ Name = LENGTH
Type = REAL
Default = 30.0
Range = [ 24.0, 36.0 ]
},

Constraint Example:
/* DIMENSION NAMED LENGTH
LENGTH >= 24
LENGTH <= 36

StephenW
StephenW23-Emerald IIIAuthor
23-Emerald III
April 2, 2012
Thanks Tom,
That was pretty much exactly what I needed.

Steve