cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable dialog box on shortcut detail retrieval after model checkout from the repository?

Former Member
0 Kudos

I have a script that is automating the process of checking out models from the repository and generating a particular form of JSON for each model. The automation is broken when PowerDesigner prompts the user to provide an input on whether or not PowerDesigner should try and load the other models that are referenced from the model that is being checked out --using shortcuts.

How can I disable that dialog box so the flow of the script is not broken? Your help is highly appreciated.

The dialog box (show below) is referenced in the documentation.

screen-shot-2017-09-28-at-202854.png

InteractiveMode Set to Batch

The interactive mode for the PD application is properly set to 'im_Batch', which should have PD take default values for the dialog box. Any idea why this is not happening in this case?

The API call looks as follows:

// Batch mode is set to avoid user prompts such as dialog boxes
pd.InteractiveMode = InteractiveModeValue.im_Batch;

string checkoutActions;
string checkoutConflicts;
string fileName = $@"{req.PathConfig.ExportDestinationDirectory}\{Path.GetRandomFileName()}";
int checkoutMergeMode = 2;
bool checkoutOpenMode = true;

BaseModel baseModel = (BaseModel)repoModel.CheckOutOldVersionToFile(req.RepoModelRef.ModelVersion, fileName, checkoutMergeMode, checkoutOpenMode, out checkoutActions, out checkoutConflicts);

Alternative Solutions

1) Repository Configurations. We could also consider creating a temporary repository configuration prior to checking out the model where the configuration would include all the model dependencies of the model that we wish to checkout. This way the model and dependencies are checked out in one go. However, I don't know if the checkouts will happen properly in one transaction, not leading to the unwanted dialog box or will still ask the user to press Yes or No.

2) Checkout Dependencies First Another solution to this problem is to access all the model dependencies prior to the checkout API call so we could check them out before the actual model. However, I don't seem to be able to find any APIs for that.

Accepted Solutions (0)

Answers (0)