I have two viewports. When I rotate / scale one, I would like the second one to update to the same view as well.
Is there any callback I can fork into when a viewport gets focus? (This would let me grab the view info from the other view and set in the newly activated view).
Alternatively if there is anything else to keep views in sync.
Try the attached plb, which has a PCL routine that will synchronise all other viewports to your current viewport.
Load the plb into Patran by typing the following on the Patran command line: !!lib ds_viewport_sync.plb
(You can load this automatically for every Patran session by putting the command in your p3epilog.pcl file - let me know if need more info on how to do that.)
To run the routine, type the following: ds_viewport_sync()
Of course you won't want to have to type that command every time you want to synchronise your views, and there are lots of options if you're prepared to do little customisation. Probably the easiest one is to assign the command to a hotkey. Add the following entry to your Patran.EventMaps file:
Shift<Key>v: CallPCL(ds_viewport_sync)
This will activate the command when you press Shift+v. You can change that to any other key you want. For more info on setting up hotkeys, see this article:
Try the attached plb, which has a PCL routine that will synchronise all other viewports to your current viewport.
Load the plb into Patran by typing the following on the Patran command line: !!lib ds_viewport_sync.plb
(You can load this automatically for every Patran session by putting the command in your p3epilog.pcl file - let me know if need more info on how to do that.)
To run the routine, type the following: ds_viewport_sync()
Of course you won't want to have to type that command every time you want to synchronise your views, and there are lots of options if you're prepared to do little customisation. Probably the easiest one is to assign the command to a hotkey. Add the following entry to your Patran.EventMaps file:
Shift<Key>v: CallPCL(ds_viewport_sync)
This will activate the command when you press Shift+v. You can change that to any other key you want. For more info on setting up hotkeys, see this article: