The function that does the hard work – ScreenShotToFile() takes some arguments to allow cropping of the created image, as – for instance - the drawing window also contains some graphics that most people wouldn’t consider to be part of the drawing. The code is pretty simple: it defines a command called CSS which creates two screenshots – one of the entire application window and one of the active document. Save the screenshot to the specified location Create a graphics object from the bitmap Set the bitmap object to the size of the screen The code I’ve adapted for use within AutoCAD is shown here. Something that may work better for certain specific scenarios is to capture graphics at the operating system level: essentially taking a screenshot (as opposed to what I previously called a snapshot – although frankly the difference is really which graphics system you ask to generate the graphics). The previous post was really focused on using AutoCAD’s graphics system to generate a bitmap of the contained model. Isn't there a way to somehow mimic the GetGsView function that is fast and works in paper space as well but has a downfall of creating a 3D view in the actual drawing whenever a 2D Wireframe visual style is set? Any help is really appreciated. I just desperately need to come up with a solution for snapshots that work on large drawings, that work in paper/model space and that use the current viewstyle settings (except the background color). Please, don't get me wrong, I appreciate all the work you've put into this blog. Also, your routine does not work properly in paper space. Your routine is just not usable for larger drawings (takes way to long). Hi Kean, I tried to develop a routine based on this post but I found 2 things that I'd like to solve if possible. I received a comment on this previous post:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |