ZoomAboutPoint
Publicado por Angel (1 intervención) el 09/03/2006 14:18:32
Hola a todos.
Tengo un problema al utilizar la funciòn ZoomAboutPoint copie un còdigo de los ejemplos de MS V8 es:
Sub ZoomAboutElement(ele As Element, dblFactor As Double, intView As Integer)
Dim rng As Range3d
Dim pntZoom As Point3d
Dim oView As View
Set oView = ActiveDesignFile.Views(intView)
' Determine the middle of the range of the element
rng = ele.Range
With rng
pntZoom.X = .High.X - .Low.X
pntZoom.Y = .High.Y - .Low.Y
pntZoom.Z = .High.Z - .Low.Z
pntZoom = Point3dAddScaled(rng.Low, pntZoom, 0.5)
End With
' Zoom about the center of he range. Zooming does not
' update the view, so it is necessary to call oView.Redraw
oView.ZoomAboutPoint pntZoom, dblFactor
oView.Redraw
End Sub
Pero al momento de llegar a la intrucciòn oView.ZoomAboutPoint pntZoom, dblFactor me aparece error en tiempo de ejecuciòn y no tengo idea de como corregirlo.
Ya he copiado anteriormente algunos ejemplos de las ayudas y me han funcionado muy bien asì que si alguien me puede ayudar se lo agradecerìa
Tengo un problema al utilizar la funciòn ZoomAboutPoint copie un còdigo de los ejemplos de MS V8 es:
Sub ZoomAboutElement(ele As Element, dblFactor As Double, intView As Integer)
Dim rng As Range3d
Dim pntZoom As Point3d
Dim oView As View
Set oView = ActiveDesignFile.Views(intView)
' Determine the middle of the range of the element
rng = ele.Range
With rng
pntZoom.X = .High.X - .Low.X
pntZoom.Y = .High.Y - .Low.Y
pntZoom.Z = .High.Z - .Low.Z
pntZoom = Point3dAddScaled(rng.Low, pntZoom, 0.5)
End With
' Zoom about the center of he range. Zooming does not
' update the view, so it is necessary to call oView.Redraw
oView.ZoomAboutPoint pntZoom, dblFactor
oView.Redraw
End Sub
Pero al momento de llegar a la intrucciòn oView.ZoomAboutPoint pntZoom, dblFactor me aparece error en tiempo de ejecuciòn y no tengo idea de como corregirlo.
Ya he copiado anteriormente algunos ejemplos de las ayudas y me han funcionado muy bien asì que si alguien me puede ayudar se lo agradecerìa
Valora esta pregunta
0