On this Page
_session (Accessing Session Data)
(As of 3.1.002.10)
DocOrigin maintains an internal mechanism for passing information between various DocOrigin programs that are being spawned internally or explicitly using the DocOrigin scripting functions. This mechanism is called Session. See the Session page for a general overview.
Functions
_session.set( name, value) | Set Session variable name to a value. |
_session.get( name[, raw]) | Fetch the value of Session variable name. If raw (defaults to true) is false |
_session.clear() | Clears all Session data. |
(As of version 3.2.001.01) Access a value in a Session variable directly as in:
_session.foo = "some value"; var foo = _session.foo;
Note, _session
variables are always stored as strings (see _session.get(xxx, false)
special case above).
Examples...
_logf("session = %S", _session.object());
Might return this in the logfile
session = { "_LastApp":"Merge", "_LastUpdated":"2020/01/30 12:10:41", "$OUTPUT":"c:\\temp\\AtwTempFiles\\AutoFieldTest_6.pdf", "abc":"ABC", "count":3 }
Other examples...
var o = _session.object(); for (var name in o) _logf("Session[%s] = '%s'\n", name, o[name]); var lastApp = o._LastApp;
See Also
Session Overview