Author Topic: Is there any event for the changes of view (viewport)  (Read 2562 times)

0 Members and 1 Guest are viewing this topic.

JohnSnow

  • Newt
  • Posts: 52
Is there any event for the changes of view (viewport)
« on: July 25, 2023, 09:17:41 PM »
Hi,

I am wondering if there is any event for monitoring the view changes? Like if I rotate or zoom the view (in a 3d space) this event will be triggered?
If no, is there any workaround? I have tried "Regen" with no luck so far.
Much appreciated.
« Last Edit: July 25, 2023, 11:57:23 PM by JohnSnow »

gile

  • Gator
  • Posts: 2515
  • Marseille, France
Re: Is there any event for the changes of view (viewport)
« Reply #1 on: July 26, 2023, 12:46:40 AM »
Speaking English as a French Frog

JohnSnow

  • Newt
  • Posts: 52
Re: Is there any event for the changes of view (viewport)
« Reply #2 on: July 26, 2023, 08:15:30 PM »
Thank you very much. I have been looking for it in Editor.

BlackBox

  • King Gator
  • Posts: 3770
Re: Is there any event for the changes of view (viewport)
« Reply #3 on: July 27, 2023, 12:34:24 PM »
While Gile's Inspector app is superior to Autodesk's MgdDbg for digging into objects, MgdDbg does provide an Events menu item that might be useful for things like this.

Perhaps Gile already has an Inspector update that does this; if so, I've missed it. :beer:

Enable the Events you want (or think you need, if not all)... then simply do the things you're trying to understand manually (change View in this case)... when done, turn off Events and look through the Command Line history to see what Events are actually being raised.
"How we think determines what we do, and what we do determines what we get."

JohnSnow

  • Newt
  • Posts: 52
Re: Is there any event for the changes of view (viewport)
« Reply #4 on: July 28, 2023, 12:54:23 AM »
Thank you. That's helpful

JohnSnow

  • Newt
  • Posts: 52
Re: Is there any event for the changes of view (viewport)
« Reply #5 on: July 30, 2023, 10:43:50 PM »
That Document.ViewChanged is working fine.
Just a quick note (it doesn't really bother me much tbh): This event is not triggered until I stop holding the mouse wheel while trying to rotate or pan the view. Any workaround to "fix" this or I should try timer?