Create Shared Parameter Excel+Dynamo

Hi everyone, Trying to add Shared Parameter to my Revit projects using an Ecxel file + Dynamo. There are many different ways to approach this. But see the image above what am I missing here. Please help!!
Thanks

Hi @SPN

You have some null values in excel. Add List.Clean to Remove and also Excel.Read is old method use Import Excel method.

Data_0 = DSOffice.Data.ImportExcel
	(ExcelFile,"SharedParameters", false, true);
Data_1 = DSCore.List.RestOfItems(Data_0);
Data_2 = DSCore.List.Transpose(Data_1);
	parameterName	= Data_2[0];
	groupName		= Data_2[1];
	type_			= Data_2[2];
	group 			= Data_2[3];
	instance		= Data_2[4]==true?true:false;
	categoryList	= Elements.Category.ByName(Data_2[5]);

1 Like

Thanks a lot for the prompt reply!!! will do it and give you a feedback!

@Kulkul could you please tell me what am I missing here?


Capture2

only use the Import Excel code, hook up a watch node. look at the results, how is your data coming in?

Troubleshoot this 1 step at a time, not a block of code at once. Analyze which step is not working as expected.

Thank you @Bjorn_Keulemans1, My question is: why despite I used the exact code that @Kulkul suggested but it is giving error! No need to confess I am a beginner but curious to learn.

Thanks!

Try removing the “_” at the end of “Type”.

Use the import first to confirm you actually get data in Dynamo, the Transpose is failing because it has no data. Nobody can answer the question if you don’t do the steps to analyze the problem.

If I had to take a wild guess it is because your data in Excel is on a Tab that does not have the name SharedParameters.