This turned out to be an interesting problem. I didn't find a
straightforward way to do this via the user interface. The best way that I
could come up thru the API was to resize the view so it matched the aspect
ratio of the sheet and then zoom in so the sheet fit in just right. I've
attached the code below with some comments.
Sanjay-
Public Sub SaveAsJPG()
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
Set oSheet = oDoc.ActiveSheet
Dim oView As View
Set oView = ThisApplication.ActiveView
Dim dAspectRatio As Double
dAspectRatio = oSheet.height / oSheet.Width
' Adjust the aspect ratio of the view to match that of the sheet
oView.height = oView.Width * dAspectRatio
Dim oCamera As Camera
Set oCamera = oView.Camera
' Center the sheet to the view
oCamera.Fit
' Zoom to fit the sheet exactly within the view
' Add some tolerance to make sure the sheet borders are contained
oCamera.SetExtents oSheet.Width * 1.003, oSheet.height * 1.003
' Apply changes to the camera
oCamera.Apply
' Save view to jpg. Make sure that the aspect ratio is maintained when
exporting
Call oView.SaveAsBitmap("C:\temp\drwg.jpg", 800, 800 * dAspectRatio)
' Restore the view
oCamera.Fit
oCamera.Apply
oView.WindowState = kMaximize
End Sub
wrote in message news:5794020@discussion.autodesk.com...
Sanjay, more one time sorry.
I try describe for you.
On IDW, the command "saveas" in JPG, today it's save the active window, with
background.
(attached file: 1.jpg)
I need the (attached file: 2.jpg), without background, only sheet size.
Hope thats helps.