# C1.DataEngine.Workspace.Clear

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_DataEngine_Workspace_Clear_" data-uid="C1.DataEngine.Workspace.Clear*">Clear Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_DataEngine_Workspace_Clear_" data-uid="C1.DataEngine.Workspace.Clear*"></a>
<h4 id="C1_DataEngine_Workspace_Clear_C1_DataEngine_ClearFileType_" data-uid="C1.DataEngine.Workspace.Clear(C1.DataEngine.ClearFileType)">Clear(ClearFileType)</h4>
<div class="markdown level1 summary"><p>Deletes data files from disk.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Clear(ClearFileType type = ClearFileType.All)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Clear(Optional type As ClearFileType = ClearFileType.All)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.DataEngine.ClearFileType.html">ClearFileType</a></td>
      <td><span class="parametername">type</span></td>
      <td><p>Type of the data files to delete.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_DataEngine_Workspace_Clear_C1_DataEngine_ClearFileType__remarks">Remarks</h5>
<div class="markdown level1 remarks"><pre><code>&lt;p&gt;If ClearFileType.All is used (which is the default, meaning all tables are removed from workspace),
</code></pre>
<p>all data and structure information is deleted, workspace is wiped clean. Use it with caution.</p>
<p>Other ClearFileType flags (or their combinations) are used for manual disk cleanup, deleting data files created in calculations.
Manual disk cleanup is an advanced feature. Use it only if the default automatic disk cleanup with <a class="xref" href="C1.DataEngine.Workspace.KeepFiles.html#C1_DataEngine_Workspace_KeepFiles">KeepFiles</a> property is not enough for your scenario.</p>

</div>


<a id="C1_DataEngine_Workspace_Clear_" data-uid="C1.DataEngine.Workspace.Clear*"></a>
<h4 id="C1_DataEngine_Workspace_Clear_System_String_C1_DataEngine_ClearFileType_" data-uid="C1.DataEngine.Workspace.Clear(System.String,C1.DataEngine.ClearFileType)">Clear(string, ClearFileType)</h4>
<div class="markdown level1 summary"><p>Deletes data files of a table from disk.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Clear(string tableName, ClearFileType type = ClearFileType.All)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Clear(tableName As String, Optional type As ClearFileType = ClearFileType.All)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">tableName</span></td>
      <td><p>Name of the table to delete.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.DataEngine.ClearFileType.html">ClearFileType</a></td>
      <td><span class="parametername">type</span></td>
      <td><p>Type of the data files to delete.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_DataEngine_Workspace_Clear_System_String_C1_DataEngine_ClearFileType__remarks">Remarks</h5>
<div class="markdown level1 remarks"><pre><code>&lt;p&gt;If ClearFileType.All is used (which is the default, meaning the table is removed from workspace),
</code></pre>
<p>original table data and structure information for that table is deleted together with calculated data based on that table.
Use it with caution. It can also be used creating a new table to ensure that it did not exist before.</p>
<p>Other ClearFileType flags (or their combinations) are used for manual disk cleanup, deleting data files created in calculations based on that table.
Manual disk cleanup is an advanced feature. Use it only if the default automatic disk cleanup with <a class="xref" href="C1.DataEngine.Workspace.KeepFiles.html#C1_DataEngine_Workspace_KeepFiles">KeepFiles</a> property is not enough for your scenario.</p>

</div>
</div>
