folderId: Retrieves folderId of SyncroSim Folder or Scenario

folderIdR Documentation

Retrieves folderId of SyncroSim Folder or Scenario

Description

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.

Usage

folderId(ssimObject)

## S4 method for signature 'character'
folderId(ssimObject)

## S4 method for signature 'Folder'
folderId(ssimObject)

## S4 method for signature 'Scenario'
folderId(ssimObject)

folderId(ssimObject) <- value

## S4 replacement method for signature '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

## Not run: 
# 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)
folderId(myScenario)

# Move the Scenario into the newly created folder
folderId(myScenario) <- folderId(myFolder)
folderId(myScenario)

## End(Not run)


rsyncrosim documentation built on Oct. 15, 2024, 1:06 a.m.