<div dir="ltr">Cinthya,<div><br></div><div>GME does not support modifying the metamodel at runtime. MgaMetaAttribute.Viewable can be set in the MetaGME model by the "Viewable" attribute on FieldAttribute.</div><div><br></div><div>Kevin</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 16, 2018 at 4:10 PM Cinthya Lopez <<a href="mailto:Cinthya_K_Lopez@raytheon.com">Cinthya_K_Lopez@raytheon.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_-2290056349117097501WordSection1">
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am trying to set MgaAttribute.Meta.Viewable = false within my Add-On. The viewable field in my metamodel for this attribute is set to True, but I want to be able to hide the attribute depending on where the user is creating this object
 within their model.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am currently getting a GME error when this line is executed saying “Unable to insert object: No active transaction.” I have  been playing around with beginning a transaction before executing this line by using both MgaProject. BeginTransactionInNewTerr()
 and MgaProject.BeginTransaction(territory) but still get the same error or I also get an error along the lines of a transaction already exists. Can the Viewable field for an MgaMetaAttribute be set programmatically? If so, what is the correct way of dealing
 with transactions when executing this from an Add-On’s ObjectEvent() function?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Cinthya<u></u><u></u></p>
</div>
</div>

_______________________________________________<br>
gme-users mailing list<br>
<a href="mailto:gme-users@list.isis.vanderbilt.edu" target="_blank">gme-users@list.isis.vanderbilt.edu</a><br>
<a href="http://list.isis.vanderbilt.edu/cgi-bin/mailman/listinfo/gme-users" rel="noreferrer" target="_blank">http://list.isis.vanderbilt.edu/cgi-bin/mailman/listinfo/gme-users</a><br>
</blockquote></div>