Prevent MsgBox to opening in PowerDesigner

47 views Asked by At

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
0

There are 0 answers