Hi everyone, this is my last milestone in the graph of editing family parameter values. I am feeding data from csv file. As all values are in string, I utilized this code to convert it to default characters (after minor customization).
As seen below, except indexes [2], [5] and [7], all other must be of int. type. In general they are taking proper type but when there is empty value it is turning to string and throwing error. I want to avoid this behavior by making them int. type whenever the index is empty.
For index 6, I managed to slice off extra “inches” to achieve required type.
I have to convert only particular indices as three of them has to be string type. I guess, if I take particular index and convert it to float and return back to list, that would work.
Also, I tried your for loop on my list, it is returning error
Have you thought about removing those values entirely from your list?
I’m assuming you want to use your values in an “SetParameterValue” node, if the values which cause problems are empty, wouldn’t removing them solve this issue?