Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I kinda get what you mean, but not fully. Advise if I got something wrong.

I think your situcation is that your SAV is shared or you are not the only person modifying it? That's why you don't always know what have got switched out?

If that's case, I think you can do the followings (assuming your bus numbers are not changed and no bus removal or addtion and no branches added or removed).

  1. Use the "abrnint" API to get the status of the all branches. Save the branch data in a CSV (or something else you like and know how to retrive data).
  2. Get rid of the branches that you don't want to change back. You can id them by the "from" and "to" buses. (You can actually do this in step 1 if you know the "from" and "to" buses for these branches.)
  3. After the SAV is changed. Use the previouly saved CSV to switch all of them back (regarless of the status). You can use the "branchchng" API for that. Don't worry about the line params, just use the defaults, e.g., "i", "_f".
  4. Now, switch the lines out accroding the status in the CSV. Again, using the "branch_chng" API.

This work-flow should satify your requirements of swithcing all branches back (except the undersired ones) and then siwth out the ones that are in your record.

You can probably still use the "outs" API with manipulations to perform delimiting and then extract the info.