Retrieves the Folder Id of a SyncroSim Folder or Scenario. Can also use to set the Folder Id for a Scenario - this will move the Scenario into the desired folder in the SyncroSim User Interface.

folderId(ssimObject)

# S4 method for character
folderId(ssimObject)

# S4 method for Folder
folderId(ssimObject)

# S4 method for Scenario
folderId(ssimObject)

folderId(ssimObject) <- value

# S4 method for Scenario
folderId(ssimObject) <- value

Arguments

ssimObject

Folder or Scenario object

value

integer of the folder ID to move the Scenario to. Only applicable if the ssimObject provided is a Scenario.

Value

An integer: folder id.

Examples

# \donttest{
# Set the file path and name of the new SsimLibrary
myLibraryName <- file.path(tempdir(),"testlib")

# Set the SyncroSim Session, SsimLibrary, Project, and Scenario
mySession <- session()
myLibrary <- ssimLibrary(name = myLibraryName, 
                         session = mySession, 
                         overwrite = TRUE) 
myProject <- project(myLibrary, project = "Definitions")
myScenario <- scenario(myProject, scenario = "My Scenario")
myFolder <- folder(myProject, "New Folder")

# Get Folder ID for SyncroSim Folder and Scenario
folderId(myFolder)
#> [1] 14
folderId(myScenario)
#> [1] NA

# Move the Scenario into the newly created folder
folderId(myScenario) <- folderId(myFolder)
folderId(myScenario)
#> [1] 14
# }