I’ve managed to export a load of information out of Revit in to Excel, the problem is I’m trying to get the information back in to the family by using Element.SetParameterByName node, which has been unsuccessful so far.
Somehow I need to map the Mark value which is the Key identifier in both the Revit project and the Excel to enable to change the other parameters which are posing a warning in Dynamo. Please see attached screenshot.
Warning: Element.SetParameterByName operation failed.
The parameter’s storage type is not a number.
Element.SetParameterByName operation failed.
The call is ambiguous between the following methods or properties: 'Revit.Elements.Element.SetParameterValue(Autodesk.Revit.DB.Parameter,
I’m not sure if this is the right way to go about changing the values in the family or not to be honest. I’ve changed the data format to number in Excel still not working.
Actually, the error indicates the parameter value should not be a number.
Use an Object.Type node to check if the type of values coming out of List.GetItemAtIndex
If it is a number, use String from Object to convert it to a string (assuming the value type expected is a string)
Vikram that boolean has worked fine, but the problem I’m having is that it’s renaming the Mark parameter in the project file which i don’t want. what I’m trying to do is as follows.
export the pile mark numbers and the loads as they are to excel. (which I have done with bounding box so it reads from left to right)
Add the loads in excel and bring back the loads into revit, that are associate to the pile marks that already exist in the project.
So i need to somehow tell dynamo that Pile Mark from Excel and Revit are the same instance of the family. Just change the loads.
If I’m not explaining what I’m after well enough please say, I’ll try and send some diagrams.
Try adding “List.Clean” node after “Excel.ReadFromFile” node. What it does is that it removes all the null values before you connect to your desired node.
I’m not sure what I have done here, when I run the code attached its renaming the piles (see P numbers) instead of just changing the loads. Please see before and after screenshots and the code itself. Sorry for being a pain in the rear.
What you need to do is align all of the piles into pile mark order, then feed the elements into the pile loadings so element with p001 matches p001 from the excel list.
I think the following should sort it(below image), as i am guessing your excel does have them in pile mark order?