Notifications
Clear all
[Closed] How can I save a viewport to a file
Sep 12, 2006 1:37 am
Hi,
I want to save a viewport to an image file, is this possible with MaxScript?
Thank you,
Christian
2 Replies
Sep 12, 2006 1:37 am
There is a more complex example in the help file but this is quick and dirty.
snagViewport = gw.getViewportDib()
snagViewport.filename = (getdir #image) + "\\" + getfilenamefile (maxFilename as string) + "_" + (viewport.GetType() as string) + "_" + ((getfiles ((getdir #image) + "\\" + getfilenamefile (maxFilename as string) + "_" + (viewport.GetType() as string) + "*")).count as string) + ".bmp"
save snagViewport
display snagViewport
Saves a snapshot of the active view to the images directory in your max folder and will increment the filename so that multiple screens can be captured.
Sep 12, 2006 1:37 am
Thank you, gw.getViewportDib() was the function that I was looking for!