Skip to Content
avatar image
Former Member

Get the list of models from folder and delete only needed models

Hi,

I am creating automation in Java and stuck on deleting model from the folder in Power Designer. My code is:

Model model = new Model(pdApp.OpenModel(projectName));

//Going inside the folder
BaseObject fO = model.FindChildByName("DataLake", PdPRJ_Classes.cls_ProjectFolder);
//Getting the list of models
ObjectBag models = fO.GetChildColl(PdPRJ_Classes.cls_ModelDocument);

So how can I iterate through the list of models and delete only that have special names

I am using org.eclipse.swt.win32.win32.x86_64 and pdj2com_16.6.2X64

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 10, 2017 at 09:35 PM

    Do not use GetChildColl.

    Instead, use f0.Children.

    Add comment
    10|10000 characters needed characters exceeded