# C1.C1Preview.Scripting.ScriptingOptions

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_C1Preview_Scripting_ScriptingOptions" data-uid="C1.C1Preview.Scripting.ScriptingOptions" class="text-break">ScriptingOptions Class
</h1>
  <div class="markdown level0 summary"><p>Represents the various options controlling scripts and expressions
used in a <a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>, and specified
by the <a class="xref" href="C1.C1Preview.C1PrintDocument.ScriptingOptions.html#C1_C1Preview_C1PrintDocument_ScriptingOptions">ScriptingOptions</a> property.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">ScriptingOptions</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.C1Preview.Scripting.html">C1.C1Preview.Scripting</a></h6>
  <h6><strong>Assembly</strong>: C1.PrintDocument.4.8.dll</h6>
  <h5 id="C1_C1Preview_Scripting_ScriptingOptions_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[C1ClassSerialization(true)]
public class ScriptingOptions</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;C1ClassSerialization(True)&gt;
Public Class ScriptingOptions</code></pre>
  </div>
  <h5 id="C1_C1Preview_Scripting_ScriptingOptions_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>Scripts and expressions can be used in various contexts in a <a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>.
While the scripting language and the set of available assemblies and namespaces
for all those scripts and expressions are defined by the properties of the
document's <a class="xref" href="C1.C1Preview.C1PrintDocument.ScriptingOptions.html#C1_C1Preview_C1PrintDocument_ScriptingOptions">ScriptingOptions</a>,
the sets of built-in variable identifiers available to a script or expression
depend on the context in which it is defined.</p>
<p>
The following tables list the possible contexts, and the identifiers
that can be used in scripts and expressions to access context-dependent
document data:
</p>
<ul><li><span class="term">Text expressions</span>
In expressions specified in square brackets in texts of
<a class="xref" href="C1.C1Preview.RenderText.html">RenderText</a>, <a class="xref" href="C1.C1Preview.RenderParagraph.html">RenderParagraph</a> or <a class="xref" href="C1.C1Preview.RenderArea.html">RenderArea</a> objects,
the following context-dependent identifiers can be used:
<table><thead><tr><th class="term">Id (type)</th><th class="description">Meaning</th></tr></thead><tbody><tr><td class="term"><b>Document</b> (<a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>)</td><td class="description">The current document.</td></tr><tr><td class="term"><b>RenderObject</b> (<a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a>)</td><td class="description">The current render object.</td></tr><tr><td class="term"><b>RenderFragment</b> (<a class="xref" href="C1.C1Preview.RenderFragment.html">RenderFragment</a>)</td><td class="description">The current render fragment.</td></tr><tr><td class="term"><b>Page</b> (<a class="xref" href="C1.C1Preview.C1Page.html">C1Page</a>)</td><td class="description">The current page.</td></tr><tr><td class="term"><b>PageNo</b> (<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>)</td><td class="description">The current 1-based page number.</td></tr><tr><td class="term"><b>PageCount</b> (<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>)</td><td class="description">The total page count.</td></tr><tr><td class="term"><b>PageX</b> (<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>)</td><td class="description">The current 1-based horizontal page number.</td></tr><tr><td class="term"><b>PageXCount</b> (<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>)</td><td class="description">The maximum horizontal page count.</td></tr><tr><td class="term"><b>PageY</b> (<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>)</td><td class="description">The current 1-based vertical (regular) page number.</td></tr><tr><td class="term"><b>PageYCount</b> (<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>)</td><td class="description">The total vertical page count.</td></tr><tr><td class="term"><b>Aggregates</b> (<a class="xref" href="C1.C1Preview.DataBinding.AggregateCollection.html">AggregateCollection</a>)</td><td class="description">The list of aggregates defined on the current document.</td></tr><tr><td class="term"><b>DataBinding</b> (<a class="xref" href="C1.C1Preview.DataBinding.C1DataBinding.html">C1DataBinding</a>)</td><td class="description">The active databinding (may differ from the
value of the <a class="xref" href="C1.C1Preview.RenderObject.DataBinding.html#C1_C1Preview_RenderObject_DataBinding">DataBinding</a> property on the current
render object, e.g. if it is not defined and parent's databinding is being used).</td></tr><tr><td class="term"><b>Fields</b> (<a class="xref" href="C1.C1Preview.DataBinding.FieldCollection.html">FieldCollection</a>)</td><td class="description">A shortcut to <a class="xref" href="C1.C1Preview.DataBinding.C1DataBinding.Fields.html#C1_C1Preview_DataBinding_C1DataBinding_Fields">Fields</a> on the active databinding.</td></tr><tr><td class="term"><b>RowNumber</b> (<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>)</td><td class="description">A shortcut to <a class="xref" href="C1.C1Preview.DataBinding.C1DataBinding.RowNumber.html#C1_C1Preview_DataBinding_C1DataBinding_RowNumber">RowNumber</a> on the active databinding.</td></tr></tbody></table>
<p>(Note: while square brackets are the default for marking expressions in <b>C1PrintDocument</b> texts,
they can be redefined via the <a class="xref" href="C1.C1Preview.C1PrintDocument.TagOpenParen.html#C1_C1Preview_C1PrintDocument_TagOpenParen">TagOpenParen</a> and
<a class="xref" href="C1.C1Preview.C1PrintDocument.TagCloseParen.html#C1_C1Preview_C1PrintDocument_TagCloseParen">TagCloseParen</a> properties.).</p></li><li><span class="term"><a class="xref" href="C1.C1Preview.DataBinding.C1DataBinding.html">C1DataBinding</a> expressions</span>
In expressions used in any of
<a class="xref" href="C1.C1Preview.DataBinding.Grouping.Expressions.html#C1_C1Preview_DataBinding_Grouping_Expressions">Expressions</a>,
<a class="xref" href="C1.C1Preview.DataBinding.Sorting.Expressions.html#C1_C1Preview_DataBinding_Sorting_Expressions">Expressions</a>,
<a class="xref" href="C1.C1Preview.DataBinding.C1DataBinding.Filters.html#C1_C1Preview_DataBinding_C1DataBinding_Filters">Filters</a>,
<a class="xref" href="C1.C1Preview.DataBinding.C1DataBinding.OutlineText.html#C1_C1Preview_DataBinding_C1DataBinding_OutlineText">OutlineText</a>,
the following context-dependent identifiers are available:
<table><thead><tr><th class="term">Id (type)</th><th class="description">Meaning</th></tr></thead><tbody><tr><td class="term"><b>Document</b> (<a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>)</td><td class="description">The current document.</td></tr><tr><td class="term"><b>DataBinding</b> (<a class="xref" href="C1.C1Preview.DataBinding.C1DataBinding.html">C1DataBinding</a>)</td><td class="description">The current databinding.</td></tr><tr><td class="term"><b>Fields</b> (<a class="xref" href="C1.C1Preview.DataBinding.FieldCollection.html">FieldCollection</a>)</td><td class="description">The <a class="xref" href="C1.C1Preview.DataBinding.C1DataBinding.Fields.html#C1_C1Preview_DataBinding_C1DataBinding_Fields">Fields</a> collection of the current databinding.</td></tr><tr><td class="term"><b>Parent</b> (<a class="xref" href="C1.C1Preview.DataBinding.C1DataBinding.html">C1DataBinding</a>)</td><td class="description">The parent databinding. Normally this is the most nested databinding defined
on a parent of the object containing the current databinding.
For a <a class="xref" href="C1.C1Preview.TableVectorGroup.html">TableVectorGroup</a>, this may be the databinding defined on another
row/column group if that group encloses the current group (i.e. contains all its rows/columns).</td></tr></tbody></table>
</li><li><span class="term"><a class="xref" href="C1.C1Preview.DataBinding.DataSetField.html">DataSetField</a> expression</span>
In expressions used to specify calculated data set fields
(<a class="xref" href="C1.C1Preview.DataBinding.DataSetField.Expression.html#C1_C1Preview_DataBinding_DataSetField_Expression">Expression</a>),
the following context-dependent identifiers are available:
<table><thead><tr><th class="term">Id (type)</th><th class="description">Meaning</th></tr></thead><tbody><tr><td class="term"><b>Document</b> (<a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>)</td><td class="description">The current document.</td></tr><tr><td class="term"><b>Fields</b> (<a class="xref" href="C1.C1Preview.DataBinding.DataSetFieldCollection.html">DataSetFieldCollection</a>)</td><td class="description">The <a class="xref" href="C1.C1Preview.DataBinding.DataSet.Fields.html#C1_C1Preview_DataBinding_DataSet_Fields">Fields</a> collection of the current data set.</td></tr></tbody></table>
</li><li><span class="term">Document scope scripts</span>
In scripts assigned to
<a class="xref" href="C1.C1Preview.C1PrintDocument.DocumentStartingScript.html#C1_C1Preview_C1PrintDocument_DocumentStartingScript">DocumentStartingScript</a>,
<a class="xref" href="C1.C1Preview.C1PrintDocument.DocumentEndedScript.html#C1_C1Preview_C1PrintDocument_DocumentEndedScript">DocumentEndedScript</a>,
<a class="xref" href="C1.C1Preview.C1PrintDocument.PageConfigureScript.html#C1_C1Preview_C1PrintDocument_PageConfigureScript">PageConfigureScript</a> or
<a class="xref" href="C1.C1Preview.C1PrintDocument.ErrorScript.html#C1_C1Preview_C1PrintDocument_ErrorScript">ErrorScript</a>,
the following context-dependent identifiers are available:
<table><thead><tr><th class="term">Id (type)</th><th class="description">Meaning</th></tr></thead><tbody><tr><td class="term"><b>Document</b> (<a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>)</td><td class="description">The current document.</td></tr><tr><td class="term"><b>Tags</b> (<a class="xref" href="C1.C1Preview.TagCollection.html">TagCollection</a>)</td><td class="description">The <a class="xref" href="C1.C1Preview.C1PrintDocument.Tags.html#C1_C1Preview_C1PrintDocument_Tags">Tags</a> collection of the current document
(this is a shortcut to <b>Document.Tags</b>).</td></tr></tbody></table>
</li><li><span class="term">Render object scope scripts</span>
In scripts assigned to
<a class="xref" href="C1.C1Preview.RenderObject.ObjectResolvedScript.html#C1_C1Preview_RenderObject_ObjectResolvedScript">ObjectResolvedScript</a>,
the following context-dependent identifiers are available:
<table><thead><tr><th class="term">Id (type)</th><th class="description">Meaning</th></tr></thead><tbody><tr><td class="term"><b>Document</b> (<a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>)</td><td class="description">The current document.</td></tr><tr><td class="term"><b>RenderObject</b> (<a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a>)</td><td class="description">The current render object.</td></tr><tr><td class="term"><b>Tags</b> (<a class="xref" href="C1.C1Preview.TagCollection.html">TagCollection</a>)</td><td class="description">The <a class="xref" href="C1.C1Preview.C1PrintDocument.Tags.html#C1_C1Preview_C1PrintDocument_Tags">Tags</a> collection of the current document
(this is a shortcut to <b>Document.Tags</b>).</td></tr></tbody></table>
</li><li><span class="term">Render fragment scope scripts</span>
In scripts assigned to
<a class="xref" href="C1.C1Preview.RenderObject.FragmentResolvedScript.html#C1_C1Preview_RenderObject_FragmentResolvedScript">FragmentResolvedScript</a>,
the following context-dependent identifiers are available:
<table><thead><tr><th class="term">Id (type)</th><th class="description">Meaning</th></tr></thead><tbody><tr><td class="term"><b>Document</b> (<a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>)</td><td class="description">The current document.</td></tr><tr><td class="term"><b>RenderObject</b> (<a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a>)</td><td class="description">The current render object.</td></tr><tr><td class="term"><b>RenderFragment</b> (<a class="xref" href="C1.C1Preview.RenderFragment.html">RenderFragment</a>)</td><td class="description">The fragment that has resolved.</td></tr><tr><td class="term"><b>Tags</b> (<a class="xref" href="C1.C1Preview.TagCollection.html">TagCollection</a>)</td><td class="description">The <a class="xref" href="C1.C1Preview.C1PrintDocument.Tags.html#C1_C1Preview_C1PrintDocument_Tags">Tags</a> collection of the current document
(this is a shortcut to <b>Document.Tags</b>).</td></tr></tbody></table>
</li></ul>
</div>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_ExternalAssemblies" data-uid="C1.C1Preview.Scripting.ScriptingOptions.ExternalAssemblies">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.ExternalAssemblies.html#C1_C1Preview_Scripting_ScriptingOptions_ExternalAssemblies">ExternalAssemblies</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the list of external assemblies that can be used in scripts in the current document.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_GenerateInMemory" data-uid="C1.C1Preview.Scripting.ScriptingOptions.GenerateInMemory">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.GenerateInMemory.html#C1_C1Preview_Scripting_ScriptingOptions_GenerateInMemory">GenerateInMemory</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether to generate script assemlies in memory.
When this property is false all assemblies will be generated in directory specified
by <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.TempPath.html#C1_C1Preview_Scripting_ScriptingOptions_TempPath">TempPath</a> property.
Note! C1PrintDocument does not delete created scripting assembles, the user's code is responsible for it.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_Language" data-uid="C1.C1Preview.Scripting.ScriptingOptions.Language">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.Language.html#C1_C1Preview_Scripting_ScriptingOptions_Language">Language</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating which language is used in scripts attached to the document.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_Namespaces" data-uid="C1.C1Preview.Scripting.ScriptingOptions.Namespaces">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.Namespaces.html#C1_C1Preview_Scripting_ScriptingOptions_Namespaces">Namespaces</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the list of namespaces that can be used in scripts in the current document.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_TempPath" data-uid="C1.C1Preview.Scripting.ScriptingOptions.TempPath">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.TempPath.html#C1_C1Preview_Scripting_ScriptingOptions_TempPath">TempPath</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the directory which will be used to hold temporary files generated during scripts compiling.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_AssignFrom_C1_C1Preview_Scripting_ScriptingOptions_" data-uid="C1.C1Preview.Scripting.ScriptingOptions.AssignFrom(C1.C1Preview.Scripting.ScriptingOptions)">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.AssignFrom.html#C1_C1Preview_Scripting_ScriptingOptions_AssignFrom_C1_C1Preview_Scripting_ScriptingOptions_">AssignFrom(ScriptingOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Assigns (copies) properties from another <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.html">ScriptingOptions</a> to the current object.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_Initialize_System_String___System_String___" data-uid="C1.C1Preview.Scripting.ScriptingOptions.Initialize(System.String[],System.String[])">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.Initialize.html#C1_C1Preview_Scripting_ScriptingOptions_Initialize_System_String___System_String___">Initialize(string[], string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes the current <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.html">ScriptingOptions</a> object witih the specified
external assemblies and namespaces.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_Reset" data-uid="C1.C1Preview.Scripting.ScriptingOptions.Reset">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.Reset.html#C1_C1Preview_Scripting_ScriptingOptions_Reset">Reset()</a>
        </td>
        <td class="markdown level1 summary"><p>Resets all properties of the current <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.html">ScriptingOptions</a> object to their default values.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_ResetExternalAssemblies" data-uid="C1.C1Preview.Scripting.ScriptingOptions.ResetExternalAssemblies">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.ResetExternalAssemblies.html#C1_C1Preview_Scripting_ScriptingOptions_ResetExternalAssemblies">ResetExternalAssemblies()</a>
        </td>
        <td class="markdown level1 summary"><p>Resets the <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.ExternalAssemblies.html#C1_C1Preview_Scripting_ScriptingOptions_ExternalAssemblies">ExternalAssemblies</a> property to its default value.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_ResetNamespaces" data-uid="C1.C1Preview.Scripting.ScriptingOptions.ResetNamespaces">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.ResetNamespaces.html#C1_C1Preview_Scripting_ScriptingOptions_ResetNamespaces">ResetNamespaces()</a>
        </td>
        <td class="markdown level1 summary"><p>Resets the <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.Namespaces.html#C1_C1Preview_Scripting_ScriptingOptions_Namespaces">Namespaces</a> property to its default value.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_ShouldSerialize" data-uid="C1.C1Preview.Scripting.ScriptingOptions.ShouldSerialize">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.ShouldSerialize.html#C1_C1Preview_Scripting_ScriptingOptions_ShouldSerialize">ShouldSerialize()</a>
        </td>
        <td class="markdown level1 summary"><p>Indicates whether the current object should be serialized.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_ShouldSerializeExternalAssemblies" data-uid="C1.C1Preview.Scripting.ScriptingOptions.ShouldSerializeExternalAssemblies">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.ShouldSerializeExternalAssemblies.html#C1_C1Preview_Scripting_ScriptingOptions_ShouldSerializeExternalAssemblies">ShouldSerializeExternalAssemblies()</a>
        </td>
        <td class="markdown level1 summary"><p>Indicates whether the <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.ExternalAssemblies.html#C1_C1Preview_Scripting_ScriptingOptions_ExternalAssemblies">ExternalAssemblies</a> property should be serialized.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Scripting_ScriptingOptions_ShouldSerializeNamespaces" data-uid="C1.C1Preview.Scripting.ScriptingOptions.ShouldSerializeNamespaces">
          <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.ShouldSerializeNamespaces.html#C1_C1Preview_Scripting_ScriptingOptions_ShouldSerializeNamespaces">ShouldSerializeNamespaces()</a>
        </td>
        <td class="markdown level1 summary"><p>Indicates whether the <a class="xref" href="C1.C1Preview.Scripting.ScriptingOptions.Namespaces.html#C1_C1Preview_Scripting_ScriptingOptions_Namespaces">Namespaces</a> property should be serialized.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
