title: Enterprise Architect: How to change type of element?
body: <p>I have an element which is created as a table. In the "Element Properties" window, I see the <code>Type</code> is <code>Class</code> and <code>Stereotype</code> is <code>table</code>. For other similar tables, the <code>Type</code> is <code>Table</code> and <code>Stereotype</code> is <code>table</code>. Something seems to be icky with this particular instance.</p>
  
  <p><a href="https://i.stack.imgur.com/GlrVC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GlrVC.png" alt="Incorrect table"></a></p>
  
  <p><a href="https://i.stack.imgur.com/6jTfd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6jTfd.png" alt="Correct table"></a></p>
  
  <p>However, when I run the following script</p>
  
  <pre><code>var element as EA.Element;
  element = Repository.GetTreeSelectedObject();
  Session.Output(element.Type);
  </code></pre>
  
  <p>The result is (for both tables!) <code>Class</code>. I thought to outsmart the EA UI by programmatically setting the type, but as both tables (the OK table and the "broken" table) both produce <code>Class</code> when asked for the <code>.Type</code>, I'm hesitant to set the <code>.Type</code> using a script.</p>
  
  <p>I have thought about removing this table and re-adding a new one, but this is tedious as the table has a lot of connections. </p>
  
  <p>How to change the Type of this particular "broken" table to "Table"?</p>