Possible to insert image into revit without writing to file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a process which creates images (.bmp). These are existing in memory. I am wondering if it is possible to take the System.IO.Stream to load the bitmap, rather than writing to a file and then reading it back again?
I understand that in order to get them into revit I need to call `ImageInstance.Create`
The ImageInstance needs an ImageType.Id, so to get that I need to call `ImageType.Create`
This method needs an ImageTypeOptions, so I call the `ImageTypeOptions` constructor.
This constructor takes a string, which is a path to the image. So before I can import the image to revit, I need to write it to the filesystem.
My question is, is there a way to get the image into revit without writing it to the filesystem first?
I do not see any obvious way, looking at the API docs, but perhaps I am missing something? Perhaps using ExternalResourceReference?
Thanks.