Autodesk Robot Structural Analysis
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
OK thanks a lot
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi I would like to make a zoom of my picture because I can't anything on my screen capture. I wrote this command but it's not good written. Would you mind correct it ?
mavueRobot.GetZoom(2, 2, 2, 2) = 1
I would like make a zoom of 150%.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
It is not that easy because zoom depends on real coordinates and viewport size \ aspect ratio.
Small 2d example below. Left top corner is important and vieport aspect ratio
3d example (left top corner is related to left top corner on ZX plain view) ; additionally you should define rotation point and rotation angle

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi it did'nt work.
I send you a video which show what I want to do ?
Would you mind send me the command of VBA to write in the macro for it ?
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Try this - change zoomfactor:
Set RobApp = New RobotApplication
Dim viewRobot As IRobotView3
Set viewRobot = RobApp.Project.ViewMngr.GetView(1)
viewRobot.Redraw (True)
viewRobot.Projection = I_VP_XY
viewRobot.ParamsFeMap.CurrentResult = I_VFMRT_DETAILED_MOMENT_XY
RobApp.Project.ViewMngr.Refresh
Dim l As Double, t As Double, b As Double, r As Double
l = 0
t = 0
b = 0
r = 0
viewRobot.GetZoom l, t, r, b
Dim CenterX As Double
Dim CenterY As Double
Dim VX As Double
Dim VY As Double
CenterX = (l + r) / 2
CenterY = (t + b) / 2
Dim zoomfacfor As Double
zoomfactor = 2
VX = Abs(l - CenterX) / zoomfactor
VY = Abs(t - CenterY) / zoomfactor
viewRobot.SetZoom CenterX + VX, CenterY + VY, CenterX - VX, CenterY - VY
RobApp.Project.ViewMngr.Refresh

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
It doesn't change anything in the view. Have a look to the video.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
mateaus wrote:
It doesn't change anything in the view. Have a look to the video.
viewRobot.SetZoom CenterX + VX, CenterY + VY, CenterX - VX, CenterY - VY
viewRobot.Redraw(True) ' <- I have not used this command, take a look in my code or use ...Redraw(0)
RobApp.Project.ViewMngr.Refresh

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
http://forums.autodesk.com/t5/Autodesk-Robot-Struc
.Redraw(1) ~ ZoomAll

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I don't understand what does mean left, top, right and bottom for the command getzoom ?
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Take a look at my screen shots in message 23 in this thread

Rafal Gaweda
Product Support
Autodesk, Inc.



