Cancel
Showing results for 
Search instead for 
Did you mean: 

Help from a Expression Guru - NX11

Experimenter
Experimenter

Dear all,

I hope someone can get me on the right track with some expression unskillfulness...

I want to drive a sketch, this limited by 2 Expression Lists and pending on a type of material

First Input:

(String) Material="Copper"
(List) Material_Options={"Copper"; "Graphite"}

Second input – 2 Lists of specific size for each Material:

(List) Copper_Electrode_data={{"10x30", "10x40", "10x50"}, {10, 10, 10}, {30, 40, 50}}

(List) Graphite_Electrode_data={{"15x15", "20x30", "20x40"}, {15, 20, 20}, {15, 30, 40}}


So far I have it working that the Electrode Size takes the List from Graphite_Electrode_data:

(String) Electrode_Size="20x40"
(List) Electrode_Size_Options=First(Graphite_Electrode_data)

What I would like to have is, that when Material is changed (to “Copper”), the Elektrode_Size takes the List from Copper_Electrode_data.
And offcourse how to to this?
Anybody any idea? Is the approach I have set up here ok?

Many thanks!

3 REPLIES 3

Re: Help from a Expression Guru - NX11

Siemens Honored Contributor Siemens Honored Contributor
Siemens Honored Contributor

Hi @PascalDW 

 

Something similar was discussed a couple of weeks ago using an Expression Lookup Table.

 

If you're not interested in using this approach then perhaps a conditional expression will give you what you're looking for:

 

Screenshot - 3_14_2019 , 9_57_00 AM.png

 

Regards, Ben

Re: Help from a Expression Guru - NX11

Siemens Genius Siemens Genius
Siemens Genius

Hi @PascalDW ,

I tried to define expressions by using NX functions substring (trims the string) & Makenumber(converts string to a number). 

Please try below.

Expressions.PNG

Hope it helps,

Thanks,

Amol

Re: Help from a Expression Guru - NX11

Experimenter
Experimenter

Tnx Ben and Amol,



I am going to follow Ben's proposal.

I was alreade close to this solution (also tried conditional formating), but I tried it in the wrong expression.

The new expression data did the trick.

 

Many thanks.

Pascal