Edit Light Fixture Asset programmatically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have obtained an instance of Autodesk.Revit.DB.Visual.Asset from a Autodesk.Revit.DB.LightNode. I know that materials for example can be edited with Revit's API by using AppearanceAssetEditorScope, creating a transaction, etc.
My question is, can the same thing be done for lights? Can we edit lights programmatically? I need to change the "intensityValue" and "filterColor" parameters of a light. When I try to set the property value, I get the InvalidOperationException "The asset property is not editable. Asset can be edited only in an edit scope."
How to I get a AppearanceAssetEditorScope for a light? Maybe it is not possible for lights?
In other words, is there a similar example to this one, but for lights: https://www.revitapidocs.com/2019/743c74ba-12de-4d77-a677-325229525955.htm