Dependency Graph Push-Pull, wont update

I have a script that I need to select an object and then change its ae tab and then get the name of that tab. It wont work in one go because of the push-pull DG wont update after the tab has been switched. Thus, the script has to be run twice to get the DG to refresh.

This is ridiculous. This problem is currently ruining this script and the others that do similar things. They are meant to be run in one go and not require the users who I’ll be giving them to to needlessly run them twice because of the DG. This could lead them to not wanting to use the script or using something else.

Surely there is a way around this that Im missing. If someone could please enlighten me that would be cool.

Is this a custom AE template or a generic one? And does the AE really offer information that you can’t get by querying the object directly?

Can you force a timeline change to see if that refreshes it?

I found a way without using the AE that I can also easily port to another program since its all python. I cant go into specifics but its settled now.