Check in this example how they iterate over all the different parts of an application:
https://github.com/simo101/sdkuservisualisation/blob/master/script.ts
Also check https://apidocs.mendix.com/modelsdk/latest/modules/pages.html for the different page elements you can traverse through.
Hi Jochen,
I did something similar for custom widgets , The sample is in Type script
function findCustomWidgets(page: pages.Page): when.Promise<customwidgets.ICustomWidget[]> {
return when.promise<customwidgets.ICustomWidget[]>((resolve) => {
const widgetList: customwidgets.ICustomWidget[] = [];
page.traverse((structure) => {
if (structure instanceof pages.Widget && structure.typeName === "CustomWidgets$CustomWidget") {
widgetList.push(structure);
}
});
resolve(widgetList);
});
}
Cheers,
Andries
Thanks for your answers, i think this will gonna help me.
greetings
Jochen