Change nested family type based on Excel input

Hello Everybody,

I’m working on a routine that creates elements based on a list of data we get in Excel.
So a brief explanation of the project, I’m making a routine which creates noise barriers based on certain data we get from the land surveyor and the project leader. Here are some examples of the input.

Input:

  • XYZ coordinates
  • Panel no
  • Amount of panels
  • Panel type

Placing the elements according to the coordinates and changing instance parameters in the main family according to the data input (Excel) is no problem. But I dont seem to be able to the change the type of a shared nested component based on the data I get from Excel. Does somebody know a solution for this?
The routine and the Excel file are attached

10046_Import data_test01.dyn (40.4 KB)
10046_Excel_Report_Families and Parameters.xlsx (18.4 KB)