SaveCopyAs & bitmap resolution

SaveCopyAs & bitmap resolution

Anonymous
Not applicable
395 Views
1 Reply
Message 1 of 2

SaveCopyAs & bitmap resolution

Anonymous
Not applicable
I have two Add-Ins where I use Inventor FileDialogs for SaveAs and SaveCopyAs (so that I can fill the filename etc. programmatically). In cases when the user wants to create a bitmap image using Save Copy As..., he often likes to define the number of pixels using the Options... button. How should this be handled? The Bitmap Save Options dialog opens normally, but the image is always saved using the resolution on the screen, no matter what the user types in the Options dialog.

I have a solution involving a custom Bitmap Save Options dialog etc., but I would like to find a better solution.

The Add-Ins are for IV 2008 and 2009, one written with VB6, one with VB.NET.

Veikko Holvio
0 Likes
396 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
From your description I'm not sure how the actual save of the bitmap is
happening. If you use the FileDialog object it won't provide the Options
button to specify the resolution since it is a generic dialog and doesn't
know what options you want available for the type of file being saved. If
you use the SaveAs method and specify that a .bmp file is to be saved it
will save it using the current screen resolution since there isn't a way to
specify any options when using the SaveAs method to it uses default values.

The way to save a bitmap at a certain resolution is to use the
View.SaveAsBitmap method. The View object represents the window and
typically obtained using the Application.ActiveView property.
--
Brian Ekins
Autodesk Inventor API
0 Likes