cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

flexible component with limits

StephenW
23-Emerald II

flexible component with limits

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 2
TomU
23-Emerald IV
(To:StephenW)

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
23-Emerald II
(To:StephenW)

Thanks Tom,
That was pretty much exactly what I needed.

Steve
Top Tags