This works thanks but i’m having trouble getting the buildingPadTypeId from a name i got, you have any tips?
I tried this just to see if the code works: FilteredElementCollector(doc).OfClass(BuildingPadType).ToElements() got the first element and used it this way
t.GetTypeId(). Example: Autodesk.Revit.DB.Architecture.BuildingPad.Create(doc,t.GetTypeId(),levelObj,listCurvedLoops)
But it still i got the error :
Exception: The buildingPadTypeId is not a valid type id for a BuildingPad.
Parameter name: buildingPadTypeId
And even if it worked i dont find a way to get the especific BuildingPadType Id from only the name i got from excel.
I got it working now just passed Autodesk.Revit.DB.Architecture.BuildingPad.Create(doc,t,levelObj,listCurvedLoops) instead of Autodesk.Revit.DB.Architecture.BuildingPad.Create(doc,t,levelObj,listCurvedLoops) but i’m having trouble getting the especific one by name.
When i FilteredElementCollector to get Walls or Levels i have the object.Name to compare, now the FilteredElementCollector passing BuildingPadType as a class dont have a .Name propertie ( the documentation say it should have ), so how do i approach it?
By FEC do you mean the FilteredElementCollector? If so does it only search for elements that are in the doc, the ones that i have at least one plotted ? (Not all the ones that are available for me to use )
There are a lot of different FEC options. Some of them can work for element types and some of them only for placed instances. A really good article for most of the available options is the building coder as usual:
Also remember that you can always grab the first available type and then change it afterwards through dynamo.