hexagon logo

Is there a way to obtain the view rotation center of a viewport

I have 2 viewports in our application and previous posts resolved the issue of synchronizing the rotations & translations of the two.
 
I am having an issue if user changes the view rotation center in 1 viewport I can't set it in the other;
 
I see the command uil_toolbar.rotation_center() calls gm_point_on_screen_init, then ga_view_rotation_center_set.
 
I tried ga_view_rotation_center_get() but it doesn't exist. Also, I tried to extract the screen pick from gm_point_on_screen_init(astring) but it stays empty.
 
So question is how to determine the new rotation center just set, then I can apply it to the other viewport.
Parents
  • Thanks Arthur. That is useful background, and seems to be what I need.... except...
     
    We have an icon on the Ribbon, "set rotation center". In .def file was calling uil_toolbar.rotation_center(). Changed this to csrs_toolbar.rotation_center():
     
    FUNCTION rotation_center()
    uil_toolbar.rotation_center()
    dump "done waiting"
    myclass.sync_views() /* added new view parameter based on your answer */
    END FUNCTION
     
    I'm sure you see the issue.. the "done waiting" comes right away without waiting for user to pick a center. I know the function gm_point_on_screen_init() gets triggered but I don't know how to wait for it... I've implemented forms that wait, but to pause execution until a point is picked without a form; any help would be great.
Reply
  • Thanks Arthur. That is useful background, and seems to be what I need.... except...
     
    We have an icon on the Ribbon, "set rotation center". In .def file was calling uil_toolbar.rotation_center(). Changed this to csrs_toolbar.rotation_center():
     
    FUNCTION rotation_center()
    uil_toolbar.rotation_center()
    dump "done waiting"
    myclass.sync_views() /* added new view parameter based on your answer */
    END FUNCTION
     
    I'm sure you see the issue.. the "done waiting" comes right away without waiting for user to pick a center. I know the function gm_point_on_screen_init() gets triggered but I don't know how to wait for it... I've implemented forms that wait, but to pause execution until a point is picked without a form; any help would be great.
Children
No Data