Why node "ElementSetParameterByName" don't write new numbers for sheets

Hi! I need your help, friends)
Why node “ElementSetParameterByName” don’t write new numbers for sheets? This node writing some numbers, but not all. Why? This problem only with parameter “Sheet number”.

Hi @ildar.kachurin

You need to remove “EmptyList” from your list. Use “List.Clean” node to remove EmptyList and also make sure your sheet elements count matches with the values count.

No. I did. The problem is no this. This screenshot after repeatedly runinig dynamo. This problem only with sheet

You need to remove EmptyList from sheets and then use List.Count.

the same result

@ildar.kachurin Use “Flatten” node for your sheets elements. And remove lacing for “Element.SetParameter” node.

The same

@ildar.kachurin Restart your computer and then try again.

The same, man)

What’s the error message? Maybe you can’t set the parameter because the number already exists?

I can’t read the parameter you’re trying to set but I deduce from the title that it’s a number and the values [a+“K”] in your code block are strings, this could be why…

The new numbers need to be strings. It looks like your sheet list contains placeholder sheets which I suspect are causing the empty lists when you attempt to get or set the parameters.

Also, when you renumber sheets, if during the reunmber process a sheet you are renumbering happens to be numbered while another sheet that is due to be renumbered has the same number, the process fails, which may be another cause of your issue.

So, a more robust way to perform this process is to use bimorphNodes.RenumberOrRenameSheets from bimorphNodes package as it handles this problem. It will also warn you if your new numbers are valid and if any sheet you are attempting to rename already exists in the document.

2 Likes

Hi, you could try to use the “Set BuildIn Parameter” node. I don’t know what kind of parameter is “номер листа” if it is the original Sheet Number parameter the Set BuildIn Parameter node from archilab package should do the job. I used it in my previous script where I have similar problem like you. For the name of the parameter you should feed “SHEET_NUMBER”
Here is quick example:

Hi! I did, but this node no working.

Thank you! This is realy cool node!! All working

I believe in your previous post you typed the wrong parameter name. With “SHEET_NUMBER” everything should be ok = )
The problem is caused by the fact that there are multiple parameters behind the regular Sheet Number parameter and to be sure you are accessing the right one you need to use Set BuildIn Parameter.
I’m happy that everything is ok now.
Good Luck!

1 Like