Issues with Setting Instance Parameters from Excel



Hi All,

Apologies in advance if this is a relatively simple post compared to what the forum is used to dealing with but I am a complete Dynamo noob!

I am currently trying to write a script (see image or download link above) which reads an excel file (see download link above) containing Sheet Numbers, Sheet Names and various other data pertaining to the sheets. I’ve got the script to automatically generate and label sheets using the data from the excel file as intended, however, I am having issues with the next step: Within the excel spreadsheet is a column titled “NORTH ARROW” with values of YES or NO. The titleblocks within my project have an instance parameter named “North Arrow”, which controls the the visibility of the north arrow (on/off) within each titleblock instance.

My intention is to have the script, individually set this “North Arrow” parameter to ON or OFF depending on the values provided in the excel spreadsheet, with YES=ON and NO=OFF.

My (assumed) workflow is as follows:

  1. Convert YES and NO values from excel spreadsheet into boolean true/false values.
    (I’ve attempted to do this using a code block (see ‘Convert to Boolean’ group within script) although I’m not sure this is correct).
  2. Set “North Arrow” parameter using true/false list of values.

The issue I’m having is with the Element.SetParameterByName node, which gives me the following error message:
Warning: Element.SetParameterByName operation failed.
No parameter found by that name.

Not sure where I’m going wrong…I’ve double and triple checked the spelling of the parameter “North Arrow” within the titleblock family.

Any suggestions at all would be greatly appreciated.

Thanks for your help!

Sorry for the rushed reply but I am just about to leave the office. But I think the problem is that you are trying to change the parameter of the sheet, instead of changing the parameter of the title block family on the sheet?
You can search for all of the title blocks and then filter the list by a parameter like sheet number then use that to apply the North Arrow parameter.
Sorry I couldn’t provide a screen capture, go to rush.
Hope this helps.


This might be useful…

  1. Check if the sheet has a parameter “North Sorrow” using getParameterValueByName.
  2. Instead of sheet, collect the instances of title block by their sheet number. The “North Arrow” parameter should be and instance of the title block family and not the sheet.
  3. If the “North Arrow” parameter is a checkbox, change true to 1 and false to 0.
1 Like

Thanks for the reply Scott.

Your comments were very helpful in isolating the cause of my error message.


Your suggested workflow allowed me to isolate the cause of my error message and reconfigure my workflow to work. I was able to get the script to turn on/off north arrows on the sheets by:

  1. Editing the code block to change YES/NO values to 1/0 values instead of TRUE/FALSE.
  2. Isolating all instances of my titleblock family using the ALL ELEMENTS OF FAMILY TYPE node.
  3. Setting the “North Arrow” parameter using the ELEMENT.SET.PARAMETER.BY.NAME node.

Thanks for your help! This community is a perfect example of what makes the internet great!