Create Folder and Get Folder

Hello to all,

during a part of my code, I create a folder with the following code to export a certain model I create.

shNode = slicer.mrmlScene.GetSubjectHierarchyNode()
sceneItemID = shNode.GetSceneItemID()
exportFolderItemId = shNode.CreateFolderItem(sceneItemID , “Models”)

How can I check if this certain folder exists later in my code and use it to export another model?

You can find many subject hierarchy examples in the script repository and full documentation here.