SAT file geometry is imported as a Autodesk.Revit.DB.DirectShape, with ‘Generic Models’ category.
Is it possible to assign a Material to this ‘Generic Models’ through Revit API?
I was thinking maybe I can assign a material through Parameter Name, but the issue is that this imported ‘Generic Models’ does not have any Material/Structural Material parameter:
I do not believe you can set a parameter for materials of direct shapes via the api, but would love to hear otherwise. Other element types (ie: free form elements in a family instance) can certainly have materials, but which of the many options is right to utilize in your instance will depend on what type of geometry you’re working with, and what your downstream uses are.
I suggest remaking the shape via Revit/Dynamo from the sat and assigning a subcatrgory to the geometry when you do. You can then associate materials to these in the object styles tab on manage. We use this inhouse at a large firm typically as it’s easy to control globally as well when dealing with lots of facade panels using common materials.
Personally I’m a fan of the ‘make it a family with a solid shape and a parameter for the material’; Added bonus if you can convert the SAT to an extrudable form in that you can utilize that as a user editable shape.
Unfortunately we use rhino inside so not 100% across the API of it. Maybe check out springnodes, I recall their being Python nodes there that worked similarly.