Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JAE on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help from a Expression Guru

Status
Not open for further replies.

PDW

Automotive
Joined
Oct 13, 2010
Messages
110
Location
BE
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!



 
 https://files.engineering.com/getfile.aspx?folder=cc5d9aa0-9436-4c82-9db3-7cac9818a20c&file=Electrode.prt
A quick and dirty solution could be to add a conditional for the material before accessing the graphite electrode data (size option, length and width) (see picture below)

image_kgnynw.png


I have tested it in NX 12.0.2mp5 and it works, but you have to apply the changes when switching the material and pick the value from the corresponding material list (it doesn't automatically change the value to the first of the new list, giving an error at first).

If it is of any help to you, I uploaded the updated file with the conditionals
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top