Hi,
by default there is no such command, but you can create iLogic rule for this,
for example:
Sub Main () ' Camera.FitAll()
Dim oSheet As Sheet
Dim cam As Camera
Dim xmin, ymin, xmax, ymax, xmini, ymini, xmaxi, ymaxi As Double
Dim i As Integer
Dim tg As TransientGeometry
tg = ThisApplication.TransientGeometry
oSheet = ThisApplication.ActiveDocument.ActiveSheet
xmin = oSheet.DrawingViews(1).Left
xmax = xmin + oSheet.DrawingViews(1).Width
ymax = oSheet.DrawingViews(1).Top
ymin = ymax - oSheet.DrawingViews(1).Height
For i = 2 To oSheet.DrawingViews.Count
xmini = oSheet.DrawingViews(i).Left
xmaxi = xmini + oSheet.DrawingViews(i).Width
ymaxi = oSheet.DrawingViews(i).Top
ymini = ymaxi - oSheet.DrawingViews(i).Height
If xmini < xmin Then xmin = xmini
If ymini < ymin Then ymin = ymini
If xmaxi > xmax Then xmax = xmaxi
If ymaxi > ymax Then ymax = ymaxi
Next
xmini = xmin + (xmax - xmin) / 2
ymini = ymin + (ymax - ymin) / 2
cam = ThisApplication.ActiveView.Camera
cam.Target = tg.CreatePoint(xmini, ymini, 0)
cam.Eye = tg.CreatePoint(xmini, ymini, 20)
Call cam.SetExtents(xmax - xmin, ymax - ymin)
Call cam.ApplyWithoutTransition
End Sub
You can add it to global rules or template or to the ribbon.
Do you find the posts helpful? "LIKE" these posts! | Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням!
Have your question been answered successfully? Click "ACCEPT SOLUTION" button. | На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ"
Олександр Черніков / Alexander Chernikov Facebook |
LinkedIn .