SessionStorageAPI¶
Description¶
With these functions the user can control webVis' management of SessionStorage objects:
- changeSnapshot(snapshotID, name, screenshotURL)¶
This changes the textual description of the snapshot for given snapshotID to the value of text.
- Arguments
snapshotID (
number()
) –name (
string()
) – OptionalscreenshotURL (
string()
) – Optional- Returns
void
- clearSnapshots()¶
Clears all snapshots.
- Returns
void
- createSnapshot(name)¶
Creates a snapshot of the current view and returns its ID.
- Arguments
name (
string()
) – Optional- Returns
Promise<number> –
- exportSession(format)¶
Exports the session to the requested format. Supported formats are: plmxml
X3D STEP242XML PLMXML Available ✗ ✗ ✓ Structure - - ✓ Enabled State - - ✗ Transforms - - ✓ Clipplanes - - ✗ Measurements - - ✗ Snapshots - - ✗ Annotations - - ✗ Attachments - - ✗
- Arguments
format (
string()
) – Optional- Returns
Promise<any>
- getSnapshotCount()¶
returns how many snapshots are currently loaded
- Returns
number
- getSnapshotData(snapshotID)¶
Returns the ids of all available snapshots
- Arguments
snapshotID (
number()
) –- Returns
SnapshotData – The ids of all available snapshots
- getSnapshots()¶
Returns the ids of all available snapshots
- Returns
Array<number> – The ids of all available snapshots
- importSession(data, format)¶
Imports a session from the data string of the given format. Supported formats are: JSON
- Arguments
data (
any()
) – the content of the fileformat (
string()
) – Optional- Returns
Promise<any>
- isSessionStorageAvailable()¶
Check whether a storage endpoint was found on the hub or the booster.
- Returns
boolean –
- removeSnapshot(snapshotID)¶
Deletes the snapshot for given snapshotID.
- Arguments
snapshotID (
number()
) –- Returns
void
- requestStoredSessionHandles(filter)¶
Retrieves the list of sessions from the infrastructure matching the filter.
- Arguments
filter (
any()
) –- Returns
- restoreSession(handle)¶
Imports the session for the given data handle from the infrastructure.
- Arguments
handle (
string()
) –- Returns
Promise<void> –
- restoreSnapshot(snapshotID, settings)¶
Restores the snapshot for the given snapshotID. The settings parameter allows to control the subset of the snaphots data to be restored
- Arguments
snapshotID (
number()
) –settings – (SnapshotContentSelection ) Optional
- Returns
Promise<void>
- storeSession(tags, offline, progressCallback)¶
Temporarily stores the session in the infrastructure and returns a handle.
- Arguments
tags (
any()
) – a map of tags to store with the session snapshot Optionaloffline (
boolean()
) – sets the space domain to the local one OptionalprogressCallback (
ProgressCallback()
) – Optional- Returns
Promise<string|void> –