Parsing AssetProperty to UnifiedBitmap?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm fairly new to the Revit API + some aspects of C#.
I'm having some problems getting the final varaibles I require from a material in order to start a transaction within Revit. The post by Jeremy Tammick has been very useful.
https://thebuildingcoder.typepad.com/blog/2017/10/material-texture-path.html
However the line :
AssetPropertyString path = connectedAsset[ UnifiedBitmap.UnifiedbitmapBitmap] as AssetPropertyString;
is causing me this error
"Cannot apply indexing with [] to an expression of type 'Autodesk.Revit.DB.Visual.AssetProperty'.
Which makes sense to me because connected asset is an instance and not a List, IList or an Array. Innevitably I am trying to access and edit the Bitmaps link, offset and size parameters. I think I need to somehow pass the UnifiedBitmap to a variable, but can't seem to find the function in the API.
Any help would be amazing.