No matter whether you are leader or not, you can add up the votes you WOULD have IF a victory voting is proposed. This means:
1. you don't have to be leader, owner or builder to get those points.
2. AP needs to be built to calculate AP points, UN needs to be built to calculate UN points.
3. Diplomatic victory or its proposition is not a precondition to get those points from AP/UN votes. You don't need to wait till the proposal turn or voting turn.
Example for 100 points:
If you are both AP leader and UN leader, you get 50 points.
If your can get 90% of AP votes, you will have 25*90%/75%=30 points.
As the cap points from both AP and UN votes is 50, you only need to get 20 points from UN votes if you've got 30 points from AP votes.
Then you got 100 points.