Jump to content
Developer Wiki and Function Reference Links ×

Viewport Coordinates


AdrianB

Recommended Posts

Hi!

I'm trying to access the postion of a viewport in Marionette.

We are working with georeferenced plans, and I want to annotate the "real-world" position, and implement a custom Grid for our site.

Ths grid is predefined as starting at coordinate X,Y with 0,0, and goes up by 1 every 50m.

 

All I need is one of the corner-coordinates of the viewport boundary, from there the math and positioning is simple.

 

The following is just what I tried so far:

But accessing "Viewport x Position" (Selector 1024, 1025 for y) results in numbers I dont understand. They seem to align with neither the location of the viewport boundary, nor the position on the Layout Sheet. 

 

They seem, however, to correspond to the position on the page, as the numbers change when i move the viewport without changing the Boundary (See "Viewport Y Position" in the Screenshots.

In case this is a problem with my marionette-network, i attached the file. The Marionette-Wrapper is named "Ansichtsbereich_Infos", has to be converted to a menu command, and executed on a layout layer.

 

Thanks for any helpfull input!

 

Screenshot2023-08-24132632.thumb.png.2b077ac0a2a85ff328da4ddd529ae69e.pngScreenshot2023-08-24132506.thumb.png.5358514ef263f0c3a996477bff7c85cb.png

 

 

marionette_Sandbox.vwx

Link to comment

Thank you for the suggestion.

 

Unfortunately, this doesn't solve the problem either.

The Bounding Box gives the coordinates on the Layout Layer:

Viewport.thumb.png.9db4d8ecce6b82efb085cc71599a981f.png

 

When there is a User Origin, its position is stored in the view Matrix offset, and the Bounding Box coordinates are added to this offset:

ViewportwithOffset.thumb.png.87a2b8f916c07b31187c16268af3754c.png

 

As viewport X/Y doesn't change with a changed origin, it also seems tied to the Layout, as mentioned previously.

 

So now I know where the viewport is diplayed on the Layout, but i still can't access the coordinates it represents.

 

 

Edited by AdrianB
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...