[gme-users] Create connection
Zoltan Molnar
zolmol at isis.vanderbilt.edu
Thu Mar 23 11:50:57 CST 2006
Using
HRESULT CreateSimpleConn([in] IMgaMetaRole *meta, [in] IMgaFCO *src, [in] IMgaFCO *dst,
[in] IMgaFCOs *srcrefs, [in] IMgaFCOs *dstrefs, [out, retval] IMgaFCO **newobj);
method of IMgaModel:
void createMyConnection(
CComPtr<IMgaModel> model, // parent of connection
CComPtr<IMgaFCO> end1,
CComPtr<IMgaFCO> end2)
{
CComPtr<IMgaMetaRole> metarole;
metarole = metaRolePtrInByName( model, "<<my_conn_name>>");
if( metarole && model && end1 && end2)
{
CComPtr<IMgaFCO> new_conn;
COMTHROW( model->CreateSimpleConn( metarole, end1, end2, 0, 0, &new_conn));
}
}
CComPtr<IMgaMetaRole> metaRolePtrInByName( CComPtr<IMgaModel> p_model, CComBSTR p_part )
{
CComPtr<IMgaMetaFCO> fco_meta;
if( p_model) COMTHROW( p_model->get_Meta( &fco_meta));
CComPtr<IMgaMetaModel> model_meta;
COMTHROW( fco_meta.QueryInterface( model_meta));
CComPtr<IMgaMetaRole> metarole;
if( model_meta)
model_meta->get_RoleByName( p_part, &metarole);
return metarole;
}
Zoli
-----Original Message-----
From: gme-users-bounces at list.isis.vanderbilt.edu [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Gábor Bátori (IJ/ETH)
Sent: Thursday, March 23, 2006 11:34 AM
To: gme-users
Subject: [gme-users] Create connection
Hi,
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)?
Thanks,
Gabor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20060323/cf75ea4f/attachment.htm
More information about the gme-users
mailing list