[gme-users] how to convert .mga -> .xmp from a script?

Peter Volgyesi peter.volgyesi at vanderbilt.edu
Wed Jun 16 10:47:02 CDT 2004


If your .mga file contains a valid meta-model, you can invoke the meta
interpreter programmatically.
The following code snippet can be used in a BON2 interpreter/plug-in:

CComPtr<IMgaProject> mgaProject = project->getProjectI();
ASSERT(mgaProject);

CComPtr<IMgaTerritory> terr;
COMTHROW( mgaProject->get_ActiveTerritory(&terr));
ASSERT(terr);

try {
	COMTHROW( mgaProject->CommitTransaction() );
	CComPtr<IMgaLauncher> mgaLauncher;
	COMTHROW(mgaLauncher.CoCreateInstance(OLESTR("Mga.MgaLauncher")));
	CComBSTR progID("MGA.Interpreter.MetaGME 2004");
	COMTHROW(mgaLauncher->RunComponent(progID, mgaProject, NULL, NULL,
GME_EMBEDDED_START));
	COMTHROW( mgaProject->BeginTransaction(terr) );
} 
catch (BON::Exception&) {
	AfxMessageBox("Something went wrong...");
}

--
peter
 

> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu 
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf 
> Of Akos Ledeczi
> Sent: Wednesday, June 16, 2004 12:07 AM
> To: A list for GME users to share thoughts and discuss bugs and fixes.
> Subject: Re: [gme-users] how to convert .mga -> .xmp from a script?
> 
> xmp is the paradigm definition file that is generated by the 
> metainterpreter from a metamodel...
> 
> Attila Vizhanyo wrote:
> 
> > Dear List,
> > 
> >  
> > 
> > How do I convert an .mga file to an .xmp file programmatically?
> > 
> > Frankly, I need to convert an .xme file to an .xmp file, 
> but I found a 
> > post about converting from .xme to .mga,
> > 
> > so what I am missing is the .mga->.xmp conversion code.
> > 
> >  
> > 
> > Thanks,
> > 
> > Attila
> > 
> >  
> > 
> > 
> > 
> ----------------------------------------------------------------------
> > --
> > 
> > _______________________________________________
> > gme-users mailing list
> > gme-users at list.isis.vanderbilt.edu
> > http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users



More information about the gme-users mailing list