Hello I am a new poster.
I’m having a lot of trouble trying to feed in a list of parameter names, values, and elements into the Element.SetParameterByName. It keeps giving me the error “Dereferencing a nonpointer”. I’ve gotten rid of the null values, but I still have this error.
To provide some context, I’m trying to import an large excel file wilth about 63+ headers. I’m using a specific header to identify and match it up with the Revit parameter list. (The goal is to fill out the some of the missing information in Revit.) However, in the excel file, there are some portions that aren’t filled in, so I filtered those out. But once I filter those out, the Revit parameter name list doesn’t match up with the Excel file (in terms of data type and such).
Is there a way around this? I have a theory that the data types aren’t matching up, (and also at times one list goes out of bounds (seg faults) that that I get the deferencing error).
So is there a way to use that identifying parameter from the excel file, and somehow automate the matching of the parameter names and/or values with the excel data? There’s A LOT of families and I don’t want to separately code data entries for each family.