More SDK examples?

0
Hi, Currently looking into the usage of the Mendix SDK. Followed the examples in the documentation, so I can create a new app, with some entities. I can't seem to find more examples of SDK usages (eg. creating folders). Are there any more examples out there?
asked
2 answers
3

How to create a folder in a module:

var unitName = 'HelperFlows'; // Name of module
      var unit = <projects.IModule>unitGetOrCreate(model, unitName); // Own function to getOrCreate a module by name

      if (unit != undefined) { 
          var newFolder = projects.Folder.createIn(unit); // Create newFolder in module.
          newFolder.name = 'FolderName'; // Set name to ‘FolderName’
          var newFolder2 = projects.Folder.createIn(newFolder); // Create newFolder2 in earlier created folder
          newFolder2.name = 'FolderName2'; // Set name of newFolder2 to FolderName2.
      }
        model.exportModuleMpk(unit.id, './test.mpk'); // Export the module to check if it worked.

 

answered
1

Hi Sven,

I created a post on the forum some time ago which might be useful for you:

https://forum.mendix.com/link/questions/12432

Contains several examples.

I hope this helps.

 

Regards

Simon

answered