Export Square image of Current View

Export Square image of Current View

dgoff96
Enthusiast Enthusiast
374 Views
2 Replies
Message 1 of 3

Export Square image of Current View

dgoff96
Enthusiast
Enthusiast

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?

0 Likes
375 Views
2 Replies
Replies (2)
Message 2 of 3

sayu94
Enthusiast
Enthusiast

Hello. I use this lines to get certain sizes

sayu94_0-1680160746566.png

 

 

0 Likes
Message 3 of 3

crapai
Advocate
Advocate

You can also use a filled region with no pattern and masking turned off.

0 Likes