Ask Your Question

Accessing fetch routines using GDIF

asked 2020-09-21 11:19:12 -0500

NLacouve gravatar image


I'm new--sorry if this has been asked before (initial search yielded nothing).

I'm using the API "GDIF" to compare the model differences between a working case and another .sav case. The API guide says you can access the results "via the internally accessible fetch routines DIFTXT, DIFBUS, DIFBRN, DIF3WN, DIF2DC, DIFMDC and DIFFCT."

How do you call these fetch routines using psspy? I've tried: psspy.DIFBUS() and psspy.fetch('DIFBUS').

Both produce errors saying that there is no module named 'DIFBUS' or 'fetch.' I'm sure this is easy, just can't find it documented anywhere. Please help!

edit retag flag offensive close merge delete


From the API Manual 1.85 GDIF entry: Usage is: call to GDIFAPI with APIOPT = 0; multiple calls to fetch routines; optionally, repeat of above steps for different Saved Case and/or subsystem; final call to GDIFAPI with APIOPT = 1. Step 2 ("multiple calls to fetch routines") is the subject of my Q.

NLacouve gravatar imageNLacouve ( 2020-09-21 16:08:25 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2020-09-21 14:12:20 -0500

perolofl gravatar image

Unfortunately, the python recording of activity GDIF is not working (33.12.2). I propose you try activity DIFF instead. Start recording and perform the activity from GUI (File - Compare…).

Open and study the created python script in a texteditor, and read about diff in API manual.

edit flag offensive delete link more


Thanks, I think your recommendation using DIFF might offer a useable workaround to get lists of Branches/BUs status differences. Though I'd much prefer programmatically to access the memory directly in the way that these mysterious "fetch routines" supposedly offer.

NLacouve gravatar imageNLacouve ( 2020-09-21 16:04:43 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools


Asked: 2020-09-21 11:19:12 -0500

Seen: 30 times

Last updated: Sep 21