Message 1 of 3
Export Square image of Current View
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am making a python tool that exports an image from the current view using the ExportImage() method. I have the below code working:
doc = __revit__.ActiveUIDocument.Document
activeView = doc.ActiveView
options = DB.ImageExportOptions()
options.ViewName = activeView.Name
options.FilePath = "path\\test1.png"
options.ZoomType = DB.FitDirectionType.Vertical
options.PixelSize = 200
options.HLRandWFViewsFileType = DB.ImageFileType.PNG
doc.ExportImage(options)
What I want to do from here is figure out how to force the image to be square? i was hoping for a "Vertical and Horizontal" Fit Option, but that doesn't seem to exist. Any ideas?