Skip to main content
Best answer by Werner_E

Two errors:

Werner_E_0-1751572761936.png

 

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
July 3, 2025

Two errors:

Werner_E_0-1751572761936.png

 

SFares14-AlexandriteAuthor
14-Alexandrite
July 3, 2025

Thanks a lot, Werner!

I am attaching he latest sheet.

Two follow up questions:

1. When i start adding units to the looked up values, Weight, Ag, works fine as shown below. But once Ii add a unit "in" to bf or to the rest i get an error, as shown in the second picture

SFares_0-1751574423589.png

SFares_1-1751574571803.png

2. Instead of typing the section size, is there an easy way to create a combo box of all the sections without typing in all the sizes inside the combo box

SFares_2-1751574746082.png

SFares_3-1751574771437.png

 

Regards,

Sam

 

25-Diamond I
July 3, 2025

Adding unit "in" to d fails because this vector does not consist of values alone but also contains a lot of strings like "-", starting at index 1534.

Even worse with b.f, where most values are strings, already starting at index 427.

Werner_E_0-1751576341181.png

Prime does not allow to assign a unit to a string. Basically assigning a unit means a multiplication and you can't multiply a string with a number.

 

So you either shorten the vector or you may omit the unit in the Excel component and use a small utility program which replaces the strings by NaNs. Assigning a unit to NaN is allowed (and sometimes even necessary).

The utility function could be used for other vectors as well, of course.

Werner_E_1-1751576691032.png

 

According the combo box. No, the combo box is not scriptable.

But you could use a list box from the advanced controls. Use variable "Section_Table" as Input and a script which copies the entries of the input vector to the listbox via "Listbox.addstring(...)".

A simple example is given in the attached sheet. As far as I remember more sophisticated version were posted here in the forum in the past now and then

 

Prime 11 sheet attached