i am using that very famous graph to create new sheets from an excel file and have now trouble with yes/no parameters… I am using Element.SetParameterByName as my last node, the element would be the sheet, the ParameterName would be B1 for example, and I thought the value could work with 0 or 1 (for no and yes). That was obviously not a great idea though and didnt work… How can one deal with that?
thats what i suspect too… the sheet has this parameter as a type parameter, so its not in the project itself… does it only work for shared parameters perhaps?
I assume you mean the title block here. You can only set type parameters for family types, not family instances. Make sure you get the family type from the title block instance in order to set the type parameter.
As @Nick_Boyts says, you need to get the type of the title block instance in order to set a Type Parameter. You can use the Element.ElementType node (OOTB), but there are various costum nodes that will do this aswell. Which ever you prefer :-).
Another thing you need to be aware of, is that Yes/No parameters expect a numeric value of 0 or 1. The values might be numeric in the Excel Sheet, but you are reading the content of the Excel Sheet as strings when doing this:
You are trying to change the sheet parameter not those of the titleBloks
You can of course keep your organization, just add ʳʰʸᵗʰᵐ | Sheet.Titleblock after Sheet.ByNameNumberTitleBlockAndView
Oh now i get the difference between sheets and title blocks - i was trying to add title block parameters to the sheet, thats why dynamo said the parameter doesnt exist… thanks!
i am trying not to use packages as the office is quite big and its complicated to constantly install new things in hundreds of computers… I am a Python beginner as well, so i thought i could get the ID of the title blocks and then add the parameters to them - didnt help at all either any other solution i could try here? Thank you very much!
Genius! That works perfectly, thank you so very much!
Now a last question: my script shows an error after i run it for the first time and I understand why: dynamo is generating the sheet numbers and cant read them at the same time in order to get the titleblocks. After I run the graph for a second time everything works perfectly. Is there a way to avoid that second run? Something like determining that a part of the graph should run after the rest? Cheers and thanks again!