Page 1 of 1

Parametric Enumeration Constraint

PostPosted: Wed Aug 08, 2018 7:31 am
by jlaub@draper.com
Hello,

I am trying to build a constraint in a parametric diagram to check if particular standards have been chosen for an instance specification.

I have a value type with an enumeration that contains possible standards. This will be selected (there could be multiple) for each instance specification.

How can I build a constraint block to check and see if MIL-STD 810G is chosen? Designs without this standard should fail for example.

Thank you,
Joseph

Re: Parametric Enumeration Constraint

PostPosted: Fri Aug 10, 2018 7:24 am
by zilvinas.strolia@nomagic.com
Hello,

You can use scripts to check for enumeration value.
For example in JavaScript expression could look like this:

Code: Select all
d= (xyz== 'Second')? 25:15;


And in Parametric Diagram script in constraint would look like this:

Screenshot_1.png


Best Regards,
No Magic Inc. Customer Support