How to retrieve the current Window Zoom?

I have to set the zoom window from an external C# application. This works great via app.ZoomWindow(...) and app.ZoomScale(...). However for the user it is a little bit disorienting when the view simply jumps to the new location. Therefor I want to program an interpolation-animation from the current view to the view that is currently displayed immediatly. To do that I need to access the current view-window. Similar to app.ZoomWindow I was hoping there would be app.GetZoomWindow, however I wasn't able to find such a method.
Can someone point me in the right direction?

Thanks!

Comments

  • Roy Klein Gebbinck
    edited October 2018

    If there is no direct method/property (the COM interface doesn't offer one) there are a number of settings that can be used to calculate these 'zoom points':

    1. VIEWCTR
    2. VIEWSIZE (height in units)
    3. SCREENSIZE (width and height in pixels => ratio)
  • @Roy Klein Gebbinck said:
    If there is no direct method/property (the COM interface doesn't offer one) there are a number of settings that can be used to calculate these 'zoom points':

    1. VIEWCTR
    2. VIEWSIZE (height in units)
    3. SCREENSIZE (width and height in pixels => ratio)

    Thanks! That solved my Problem. Is there an easy way to read the command output though? Rightt now I do it via ui Automation.

  • Use the GetVariable method of the document object.

  • EStein
    edited November 2018

    What would be the parameter I have to pass there? Or where can I look that kind of stuff up myself? Right now I only check the developer reference, but the documentation is pretty lacking there (https://www.bricsys.com/bricscad/help/en_US/CurVer/BricsCAD/index.html?page=source/DeveloperReference.htm)

    EDIT: Nvm figured it out. System variables can be accessed with the command SETVAR->Enter->Enter. Possible system variables are VIEWCTR, VIEWSIZE and SCREENSIZE. So the values can be accessed directly via document.GetVariable(VIEWCTR) for example.

    Thanks @Roy Klein Gebbinck !

This discussion has been closed.