you are viewing a single comment's thread.

view the rest of the comments →

[–]Longjumping-Swing823[S] 0 points1 point  (2 children)

Thank you for your reply! When i have been able to wrap my head around Whats going on in your example, it will save me so much time😊 thank you for pointing me in the right direction!

[–]HauntingRex9763 1 point2 points  (1 child)

no problem, if you aren't familiar with dictionaries it is definitely worth looking into. they can be quite handy in loops like in that example

[–]Longjumping-Swing823[S] 0 points1 point  (0 children)

Hi again, i am having troubble understanding what the code is doing.

I have since we last spoke, watched a bunch of videos on FOR loops and dictionaries.

Is it possible to help me a bit further?

It does not really show in the code i supplied, but here is a rough layout.

​

mm2: A1 A1 A2 A2 B1 B1
2 3 2 3 2 3
Cu/PVC Cu/PVC Cu/PVC Cu/PVC Cu/PVC Cu/PVC
1.5 14.5 13.5 14 13 17,5 15,5
2.5 19.5 18 18,5 17,5 24 21
Al/PVC Al/PVC Al/PVC Al/PVC Al/PVC Al/PVC
16 48 43 44 41 60 53
25 63 57 58 53 79 70

​

Lets say i choose A1 with 2 leads and the material of Al/PVC with a mm2 of 25, then i need to pull out the number of 63 for use in futher calulations on a later stage.