Can't set some UDAs

Good morning all,

I’m trying and trying to set some UDAs and I can’t. I have the same branches. Each branch is an assembly and 10 UDAs as multiline as shown below:

This is the error I’m getting:

What am I doing wrong?
The items on each branch has to be the same?
Can I modify several UDAs at once?
In theory has to be as multiline or separated with semicolon. Can you spot what I’m doing it wrong?

Thank you very much in advance.

Luciano

(Rhino 6/Tekla 2021)

I’ve done it like this:

If you think of some other method, I’ll appreciate it.

Luciano

Hi Luciano, the UDAs in those braches should be joined together using newlines or semicolons, try the Text Join component on the UDAs like this:

Then you can also go ahead and flatten the inputs of the Set UDAs component as both trees now have an equal number of branches, this might be slightly better for performance.

Cheers,

-b

1 Like

Ahhhhh, awesome, I understand now. Excellent. I’ll do that then.

Thank you like always,

Luciano.

1 Like

Hi Sebastian,

Regarding date UDAs. I’ve tried “05/06/2023”, “05-06-2023”, “05.06.2023”, “2023-06-05” (always with double quote), and the component says:

image

But I always get this:

image

This is how I’ve created the UDA in the inp file:

In the contentattributes_userdefined.lst I’ve done this:

Should I also check valuefieldclasses.lst?

Luciano

Hi Luciano,

didi you set the type to “date”?

Cheers,

-b

1 Like

Hi,

I was using “Set UDAs” because I’ve created the UDA via inp file. Do I have to use “Construct UDA” even though I have the inp?

Luciano

Excellent! It worked!

I’ve used “Construct UDA” as you’ve said and it converts the values to seconds (counting from 01.01.1970), as the date UDA needs, so at the end in the “Set UDAs” I have the correct value so it populates correctly. Awesome!

Thank you Sebastian!

Luciano

1 Like

Yep, objects.inp just affects the UI in Tekla. Underneath the date UDA type is actually an int and that’s what set and read from the db. The int value is the total time in seconds from 1970-01-01 to your date. So that’s the number you’d need to use.

Grasshopper seemingly hasn’t got support for datetime subtraction which would be needed to get this value, although the conversion would be straightforward in code. Otherwise the Construct UDA does the conversion for you.

Cheers,

-b

1 Like