<?xml version="1.0" ?>
<!--
  RSS generated by Inquira Information Manager
-->
<rss version="2.0">
<channel>
<title><![CDATA[Hexagon Safety &amp; Infrastructure - Post to topic Knowing the levels of a cad file takes a long time]]></title>
<link>http://support.hexagonsafetyinfrastructure.com/infocenter/index?page=home</link>
<description>Post to topic Knowing the levels of a cad file takes a long time</description>
<language>en</language>
<copyright>Copyright © 2002, 2012, Oracle and/or its affiliates. All rights reserved.</copyright>
<generator>Oracle Knowledge Information Manager</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
 

 
<item>
        <title><![CDATA[Knowing the levels of a cad file takes a long time]]></title>
        <link><![CDATA[http://support.hexagonsafetyinfrastructure.com/infocenter/index?page=forums&topic=507202533d4c56d5015c7a0b7b7f007b73&actp=RSS]]></link>
        <description><![CDATA[<p>Good morning, We are using a CAD connection to load the levels of a CAD file in a combobox by &quot;GRecordset&quot;. Our issue is this process takes a long time because the CAD file has 300.000 elements and It can not be used&nbsp;&quot;DISTINCT&quot; in the sql statement. is there other way to know the levels of a CAD file by code?</p>

<p>This is our code:</p>

<p>string[] cadFileLevels = { };</p>

<p>int cadFileLevelNumber = 0;</p>

<p>Intergraph.GeoMedia.PClient.GDatabase gDatabase = cadConnection.Database as Intergraph.GeoMedia.PClient.GDatabase;</p>

<p>Intergraph.GeoMedia.PClient.GRecordset gRecordset = gDatabase.OpenRecordset(&quot;SELECT ElementLevelName FROM AllElements&quot;, null, null, null, null, null);</p>

<p>if (gRecordset.RecordCount &gt; 0)</p>

<p>{</p>

<p>gRecordset.MoveLast();</p>

<p>gRecordset.MoveFirst();</p>

<p>while (!gRecordset.EOF)</p>

<p>{</p>

<p>try</p>

<p>{</p>

<p>if (Array.IndexOf(cadFileLevels, gRecordset.GFields[&quot;ElementLevelName&quot;].Value.ToString()) &lt; 0)</p>

<p>{</p>

<p>Array.Resize&lt;string&gt;(ref cadFileLevels, cadFileLevels.Length + 1);</p>

<p>cadFileLevels[cadFileLevelNumber] = (gRecordset.GFields[&quot;ElementLevelName&quot;].Value == DBNull.Value ? string.Empty : gRecordset.GFields[&quot;ElementLevelName&quot;].Value.ToString());</p>

<p>cadFileLevelNumber++;</p>

<p>}</p>

<p>} catch { }</p>

<p>gRecordset.MoveNext();</p>

<p>}</p>

<p>}</p>

<p>Thanks.</p>
]]></description>
        <pubDate>2017-06-06 08:35:05 Etc/GMT</pubDate>
        <guid isPermaLink="true"><![CDATA[http://support.hexagonsafetyinfrastructure.com/infocenter/index?page=forums&topic=507202533d4c56d5015c7a0b7b7f007b73&actp=RSS]]></guid>
</item>
</channel>
</rss>
