How would one pass an array of distances for an array of Surfaces?

I have a list of surfaces to offset and I have a list of offset values. I thought I would plug them together, but the error message says can’t find a version of Offset that takes arguments of type (_array, _array).

Have you tried using List.Combine on this?

I have had success creating lists, but the Surface.Offset doesn’t seem to like a list of offsets. If I pass a list of surfaces and a single offset value, it works. When I pass a list of offset values, I get the error. I wonder if I am going to have to create a python script and pass in the two lists and create the offset in the script? As you might imagine from seeing my posts, python script is far from my strength.

Hi Nelson,

It looks like you are passing unit-ed values to the distance input. Afraid you need to strip out the units and just take the value using a SIUnit.Value


Thanks Zach, I thought that might be the issue, and tried it and got an error. Since you showed it working, I tried again and now see what the error is…I am passing a zero value which becomes null. Any ideas how I pass the correct type of value?


Not elegant, but it works…


Hmm. You mean that your script is not unit-izing the zero lengths?

If you are generating these values from a Python script, can you just strip out the units inside of the script itself?

I hate to be greedy, but could you point me to an example of doing it in code? I don’t know that it wasn’t unitizing the zero lengths, because I was assigning a value of zero. I have no idea how to tell python to consider it a length. It was just a number.