0

I need to checkout models automatically using VBScript, but when the model DBMS is not valid a MsgBox showed up and the human action becomes needy. I am looking to way to supress this MsgBox with a cancel command and just skip the model.

I tried to just check for the dbms property but it is in under Model class, which is only available after the RepositoryModel.checkout.

I tried to trap the error too, but the error seems to raise only after the MsgBox is canceled.

A minimum code that reproduces the problem:

Dim rc 
Set rc = RepositoryConnection
Dim CurrentRepositoryModel
Set CurrentRepositoryModel = rc.FindChildByPath("path/to/RepositoryModel", PdRMG.Cls_RepositoryModel)

' It's not suposed to skip the error now, I was just testing if it's supress MsgBox 

On Error Resume Next
CurrentRepositoryModel.CheckOut()
Output err
user692942
  • 16,398
  • 7
  • 76
  • 175
Lucas Maraal
  • 39
  • 10
  • It looks like a bug around the CheckOut dialog. PowerDesigner dialogs are supposed to consider the InteractiveMode global property (with a default value of im_Batch); it looks like this one does not. – pascal May 23 '23 at 06:11
  • on the other side... you are writing a script, so automating a manual procedure... Can you assume that the DBMS will be accessible, for example by checking it in the repository, under `/Library/Resources/Model Languages`, in which case, it will automatically be made available (and updated if necessary) under the _SHARED Name Path? – pascal May 23 '23 at 06:16

0 Answers0