So there is no mis-match between the ID numbers of the circuit diagrams in PSCAD and the python sript. They are exactly matched.
The problem is that you have gotten the wrong IDs as follows: The following IDs are for the physical electrical curcuit breakers that appear in Red color in PSCAD:
b1 = main.user_cmp(1534465971)
b2 = main.user_cmp(962967610)
b3 = main.user_cmp(227047871)
however, the IDs that should be written in the python script are the ones for the control blocks that control the physical curcuit breakers (i.e. Timed Breaker Logic) which are matching the ones in PSCAD as shown in the below picture. You can see that they are exactly matching the ones in the python code
So, there is no error or mis-match. Hope that reveals the confusion :)
Also, the answer for the new project is coming soon.....