<div dir="ltr">We just had this discussion on the GReAT list. It's fairly straightforward unless you are using CrossLinks. <br><br>The rough procedure:<br>0. Use the GReAT Master Interpreter to generate standalone code.<br>
1. Run the UDM interpreter wizard (c:\Program Files\UDM\bin\UIntWiz.exe) to create your project:<br>1a. Take the defaults on the first page unless you know better.<br>1b. Enter the Meta-name.h and Meta-name.cpp that were generated by GReAT. <br>
1c. Enter your component name (pick something), and select the box that says "Display Icon on GME Toolbar".<br>1d. Finish -- the generated project will have a few quirks. You may have to edit Include/Linking paths to get it to build. I sincerely hope that will be fixed in the next release. Send e-mail to the UDM list if you get stuck.<br>
<br>2. Copy the guts of the main() function and the includes into the CUdmApp::UdmMain function in your UDM interpreter. It should look something like this (your include file and type names will be different, of course):<br>
<br><top of file><br>#include "GenSchedGen_2_ESMoL.h"<br><br>...<br><br>void CUdmApp::UdmMain( ... ) // Parameters<br>{<br><br>Udm::Object rootObject=p_backend->GetRootObject();<br> ESMoL::RootFolder rf = ESMoL::RootFolder::Cast( rootObject );<br>
<br>// Add objects to input packets.<br> if ( rf )<br> {<br> Packets_t eSMOLIns_1;<br> eSMOLIns_1.push_back(rf);<br><br> // transformation<br> TopLevel_0 topLevel_0;<br> topLevel_0( eSMOLIns_1);<br>
}<br> else<br> {<br> AfxMessageBox( "No root folder found (or invalid cast)!" );<br> }<br>}<br><br>I cross-posted this message to the GReAT users list (and UDM, just in case). If your transformation has CrossLinks then you will need a small patch to get your models initialized at startup. If you need to link in a library from your transformation you will have to copy that into your UDM project by hand as well.<br>
<br>-Joe<br><br><div class="gmail_quote">On Tue, Oct 14, 2008 at 4:19 PM, Gramatges, David (US SSA) <span dir="ltr"><<a href="mailto:david.gramatges@baesystems.com">david.gramatges@baesystems.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Is there a good way of getting the current filename (.mga
file) being used or database connection string being used from within Component:invokeEx()
(GME interpreter)? I would like to pass this result as the systemname
argument for Udm::SmartDataNetwork::OpenExisting().</span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Alternatively, is there a good way of using the Project
reference passed into Component::invokeEx() to achieve the same effect?</span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">What is the best way of using generated code from GReAT
within a GME interpreter?</span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Thanks,</span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Dave</span></font></p>
</div>
</div>
<br>_______________________________________________<br>
gme-users mailing list<br>
<a href="mailto:gme-users@list.isis.vanderbilt.edu">gme-users@list.isis.vanderbilt.edu</a><br>
<a href="http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users" target="_blank">http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users</a><br>
<br></blockquote></div><br></div>