I have checked the earlier discussions on this subject but I guess my requirement is slightly different.
FYI, I am using Dynamo 1.2 and Revit 2016.
- Read Excel file for a number of values including Parameter Type, Parameter Group and Category
- Split Excel column-wise as lists (I will manage the Excel to match the length of lists to be the same). In the future, I intend to even create a drop-down for lesser possibility of error.
- Use this data to create Shared Parameters and add them to the Project.
The reason I wish to manage it this way is because I see a lot of Shared Parameters that would be required to be added at a later date (the list is not finite now but I intend the script to be able to scale up).
First of all, Thanks to BumbleBee creator @Konrad_K_Sobon, so I can decide the origin of Excel import.
Thanks to @Ritesh_Chandawar for explaining List.combine and helping me out.
What doesn’t work?
All of this works except the idea of scaling up! Meaning the Parameter Type, and Categories have be selected from the node dropdown and used (as shown in the Pink Groups) for the parameters to be created and added (even though it shows a Null in the output, the script does its job). The problem with this is that the script has to be touched every time to define these two inputs for adding new shared parameters, which defeats my purpose of this script.
Also tried the Add Sharer Parameter node from Grimshaw package - also couldn’t make it to get what I wish!!
Attached are the files for your review and suggestions.
RCS-Add & Set Values for SP_Excel.dyn
Can anyone help me out wherever I have misunderstood &/or done something wrong?
Also, any ideas to make this more efficient (even by reducing one node) are most welcome.
Did not know if I was not passing String values as a list-Hence used String from Object. If something else is the issue, these nodes are not required…
Reattached the image - Thanks to Ritesh Once again
Apologies for the long post but wanted it to be clear
Could please upload your screenshot/image again. It is not readable. Thanks
I have recaptured the image. here you go
Thanks for the reply. Have replaced the image.
Had to zoom in till the level of one node (as advised by @Ritesh_Chandawar) till it worked!!
@Ritesh_Chandawar Thanks, Did you open the dyn file and captured?
@Chandrasekar_Rajaman Which Revit version your using?
Using Revit 2016 and Dynamo 1.2
@Chandrasekar_Rajaman Similar issue is discussed in this topic Add shared parameter node you can find Dyn Script try that. Good Luck!
Will try that @Kulkul
Remember reading that post but TBH, I didn’t try the DYN.
Still, no luck!! Though it worked with the downloaded Excel file…
So it’s got to be something that is there in my Excel file…??
I have no idea of Python coding - so can’t follow what’s the error in line 101
Attached files used…
SP_Temp.xlsx (9.6 KB)
Shared Parameter Dynamo1 - 2016_RCS.dyn (19.6 KB)
Any guideline would be much helpful
Alright, I will fix it for you give some time.
Dear @Kulkul ,
i tried your script & it works just fine.
Thank you for help.
Could you help me Adding some of these parameters as project parameter on some categories?
Hi @MegaMax84x Sure why not. Could you please create a new topic.
i created a new topic as requested, could you help us??
Thanks a lot for your kind efforts
It works as expected when using with the Excel you uploaded.
But, When I try to change the Parameter Group to be Multiline Text, it fails
Maybe there’s a syntax that I am missing
Can you please advise how to change that?
There is no PG “MultiLineText” that’s the reason it throws that error. I suggest you use different PG…
It’s exactly the same definition, no changes except the one highlighted value in my previous post.
PG_MultilineText is Parameter Group (I suppose)
That value gets dropped out of the list too
The Category part didn’t have errors