Is possible to set a value from a Material Parameter in a Family?
Perfect! I was trying a node i made and set the rest of parameters despite the Material. Iāll check that one, i think i have it.
Thanks a lot for your time and solution.
Hi again @Kulkul I just tried that solution.
It says Check Parameter Type.
The only difference between your solution and mine is the Element.ID node. Could be that?, or did you modify the Set Active Famiy Parameter By Name?
Thanks again.
Yes use that. BTW do you have āMaterialā Parameter in Family properties?
Use that it means āyour nodeā or the one iām using already?
By the way, i checked the exception and says:
Exception: The storage type of family parameter is not a double type or integer type.
Parameter name: familyParameter
My node Element.Id returns an integer. Should return an Element ID for make the Set Active Family Parameter By Name work?
- The Material prameters is a Type Parameter, is in Family Properties, would be any different if would be an instance parameter ?
Yes!
@Raul.Galdran Follow exactly my instructions on the gif.
Excuse me, i found the node Element.ID, thought didnāt have it in my library. Now it worked!
Thanks for your time.
Hello @Kulkul! Please repost your solution.
Hey,
The āAll Elements of Typeā didnāt work for me, not sure whatās changedā¦
Hereās my versionā¦
Hope that helps,
Mark
import clr
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
from Revit.Elements import *
doc = DocumentManager.Instance.CurrentDBDocument
fec = FilteredElementCollector(doc).OfClass(Autodesk.Revit.DB.Material)
materials = []
for material in fec:
materials.append([material.Name, material.Id])
OUT = materials