AdrianB Posted August 24, 2023 Share Posted August 24, 2023 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! marionette_Sandbox.vwx Quote Link to comment
Marionette Maven Marissa Farrell Posted August 24, 2023 Marionette Maven Share Posted August 24, 2023 Have you tried using the Get Bounding Box node? That should return the Top Left and Bottom Right points of the VP, then you could extract the X and Y of the points using Get XY. Quote Link to comment
AdrianB Posted August 28, 2023 Author Share Posted August 28, 2023 (edited) Thank you for the suggestion. Unfortunately, this doesn't solve the problem either. The Bounding Box gives the coordinates on the Layout Layer: 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: 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 August 28, 2023 by AdrianB Quote Link to comment
Recommended Posts
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.