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!

Limit expression input to list of values...

Status
Not open for further replies.

Fuseneo

Industrial
Jun 16, 2009
1
I am trying to find a way to limit the input of an expression to a set of values. Something drop-down boxish. Does anyone know a great way to accomplish this?

Thanks!
 
Replies continue below

Recommended for you

Do you mean that the expression has to fall within a range between 1-10 or similar? I guess you could set another expression to check it and create some kind of response such as suppressing or unsuppressing it by using a conditional check.

If you want a drop down box then I guess you could create some kind of program using a journal or the like, but that would neither preclude you from changing it manually using the expressions editor nor affect how the expressions editor works.

Lastly if you're going via a spreadsheet I don't know what happens if you try to add a pull down box inside excel. It seems improbable that it would work but until you try I guess you can't tell.

Best Regards

Hudson

www.jamb.com.au

Nil Desperandum illegitimi non carborundum
 
Starting in NX 6.0 we have introduced a new feature which will allow you to add what we call a 'Requirement' to an expression where you can define certain criteria to be used to check to see if you've entered the correct value or even if an expression which depends on other expressions has not fallen outside some desired range or not.

Some of the criteria which can be set are:

Single Sided Comparison

Where you can test whether an Expression value is Equal, Not Equal, Greater Than, Greater Than or Equal, Less Than, Less Than or Equal.

Double Sided Comparison

Where you can test is an Expression Greater Than, Greater Than or Equal to one value and also Less Than, Less Than or Equal to another value.

Set of Values

Where you can check the Expression value against a list of acceptable values.

Now this is not limited to only Floating Point Numbers, but also Integers, text Strings and Booleans (check for a True/False status).

Now there are 3 levels of 'severity' when failing a test, Error, Warning and Information. In each case the system will display a certain type of icon indicator in the expression Dialog showing that status of all Expressions with check requirements assigned to them. Expressions which pass their checks will have a 'Passed' indicator (Green Check-mark). Note that unless you arrange for some other action to be taken, setting up a check requirement will NOT prevent you from violating one or more of these check Requirements, but it will provide a scheme where you can quickly see where either entries or results are not conforming to your desired intent.

Note that these checks can also be assigned to measurement expressions which will allow you to flag measurements which you might have added to a model as a sort of geometric 'debugging' task.

Anyway, if you're using NX 6.0 you may wish to look into this. You can either create a Check Requirement on-the-fly from within the Expression editor (just select an existing Expression and press MB3 and you will see an option to 'Add a Check') or you can go to...

Analysis -> Check Requirements...

...and create or edit Check Requirements there as well as check their status and see how they are being used and what they are checking.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Another option would be a program for entering the expression data upfront. The program could validate the entry.


"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
 
One other other thing. If you do place one or more Check Requirements on the expressions in your model, you can also see their status in the Part Navigator, as shown below where you can see that I've placed 2 Checks on my model and one is showing an Error status (Red 'X') while the other check shows that it has passed (Green Check-Mark):

Check_Requirements-1.jpg


You can also select a 'check' item, press MB3 and have the option to query the status, the criteria used, etc. as well as the ability to Delete, Suppress and even Edit the Check Requirement.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor