<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff size=2>Using
</FONT></SPAN></DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2> HRESULT CreateSimpleConn([in] IMgaMetaRole
*meta, [in] IMgaFCO *src, [in] IMgaFCO
*dst,<BR> [in]
IMgaFCOs *srcrefs, [in] IMgaFCOs *dstrefs, [out, retval] IMgaFCO
**newobj);<BR>method of IMgaModel:</FONT></SPAN></DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff size=2>void
createMyConnection( </FONT></SPAN></DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2>CComPtr<IMgaModel> model, // parent of
connection<BR> CComPtr<IMgaFCO>
end1,<BR> CComPtr<IMgaFCO> end2)<BR>{</DIV></FONT></SPAN><FONT
face=Arial color=#0000ff size=2></FONT>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2> CComPtr<IMgaMetaRole> metarole;<BR> metarole
= metaRolePtrInByName( model,
"<<my_conn_name>>");<BR></FONT></SPAN><SPAN
class=541283717-23032006><FONT face=Arial color=#0000ff size=2> if(
metarole && model && end1 && end2)</FONT></SPAN></DIV>
<DIV><SPAN class=541283717-23032006> <FONT face=Arial
color=#0000ff size=2>{</FONT></SPAN></DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2> CComPtr<IMgaFCO>
new_conn;</FONT></SPAN></DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2> COMTHROW(
model->CreateSimpleConn( metarole, end1, end2, 0, 0,
&new_conn));</FONT></SPAN></DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2> }<BR>}</DIV></FONT></SPAN>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2>CComPtr<IMgaMetaRole> metaRolePtrInByName( CComPtr<IMgaModel>
p_model, CComBSTR p_part )<BR>{<BR> CComPtr<IMgaMetaFCO>
fco_meta;<BR> if( p_model) COMTHROW(
p_model->get_Meta( &fco_meta));</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2> CComPtr<IMgaMetaModel> model_meta;<BR> COMTHROW(
fco_meta.QueryInterface( model_meta));<BR></FONT></SPAN><FONT face=Arial
color=#0000ff size=2></FONT></DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2> CComPtr<IMgaMetaRole> metarole;<BR> if(
model_meta)</FONT></SPAN></DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2> model_meta->get_RoleByName( p_part,
&metarole);<BR></FONT></SPAN></DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2> return metarole;<BR>}<BR></FONT></SPAN></DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2>Zoli</DIV></FONT></SPAN>
<DIV><SPAN class=541283717-23032006><FONT face=Arial color=#0000ff
size=2> </DIV></FONT></SPAN>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma><FONT size=2><SPAN class=541283717-23032006><FONT face=Arial
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma><FONT size=2><SPAN
class=541283717-23032006> </SPAN>-----Original
Message-----<BR><B>From:</B> gme-users-bounces@list.isis.vanderbilt.edu
[mailto:gme-users-bounces@list.isis.vanderbilt.edu] <B>On Behalf Of </B>Gábor
Bátori (IJ/ETH)<BR><B>Sent:</B> Thursday, March 23, 2006 11:34
AM<BR><B>To:</B> gme-users<BR><B>Subject:</B> [gme-users] Create
connection<BR><BR></DIV></FONT></FONT>
<DIV><SPAN class=855223117-23032006><FONT face=Arial color=#0000ff
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=855223117-23032006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=855223117-23032006><FONT face=Arial color=#0000ff size=2>Has
anybody an example code or guideline how to create a connection between two
FCOs through the Raw COM interface in GME (in an interpreter or
addon)?</FONT></SPAN></DIV>
<DIV><SPAN class=855223117-23032006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=855223117-23032006><FONT face=Arial color=#0000ff
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=855223117-23032006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=855223117-23032006><FONT face=Arial color=#0000ff
size=2>Gabor</FONT></SPAN></DIV></BLOCKQUOTE></BODY></HTML>