Skip to Content
0

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

Aug 04, 2017 at 04:38 PM

36

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Phillip Lam
Aug 10, 2017 at 09:35 PM
0

Do not use GetChildColl.

Instead, use f0.Children.

Share
10 |10000 characters needed characters left characters exceeded