Trying to copy level parameter into a shared parameter - schedule for cable trays by level

Hello, I am a beginner in Dynamo and I’m trying to copy the text in “Reference Level” into a shared parameter called “Commentaires Supl”

I asked chatgpt to help me and made this first version of a script, but it doesn’t work.

What can I change to try and make this work ? Thanks !

Instead of asking chatGPT to do the script for you i think it would help your journey to just try it yourself, with the help of existing posts in this forum :slight_smile: Being presented a solution all the time without trying yourself really diminishes your ability to learn something. Just my opinion though.

As for the problem with the script, can you show what the yellow error balloon says?

Yes you are correct however I don’t have the necessary time, currently trying to call colleague or other companies that can offer help with screenshare.

Here is the error message :

“The storage type of the parameter is not an element”

I don’t understand what this means because I don’t see where the “storage type” is

I have tried this approach and it doesn’t work either

I’m sure I’m not far away, but I just don’t understand how dynamo works nor do I grasp what lists are.

Here is a similar topic that was running into the same issue:

Can you show all the previews in your nodes so we can see what’s in being fed through?

For reference, if you dont understand how Dynamo works, or what lists are, i advice you to flip through this when youre trying to do something with Dynamo:

Here is with the previews. I’m reading the topic you linked me. cheers

From what I understand, the value that is coming out can’t be taken in properly by that last node. The input first needs to be changed into a string. I tried this node called “string from object” without success

try e.Name in a code block

As the other topic suggests, you are feeding an element into the paramter value, whereas you actually want to feed the name of the element. you can do this by placing a codeblock and typing e.Name, this takes the element as input and gives the name as output (a string)

Name with capital N

One side node though, be careful with assigning string values to parameters when they reference another parameter. In this case your cable tray is associated with a certain level, now you’re manually adding this value to the same element as a string. If you change the level, the string value wont change and a rerun of your graph is needed. I assume this is for exporting purposes but i highly advice you to not duplicate ‘markers’ so to speak. This is very prone to user error.

1 Like

I used block and it worked. Thanks !