I'm looking at mdlAssoc_createOrigin() in an attempt to create an association between a line and a cell. The line is written into the model just prior to the association attempt:
ElementRef m_lineElemRef=m_lineElm.GetElemRef();
AssocPoint assocPt;
StatusInt iStatus=mdlAssoc_createOrigin( &assocPt, NULL, NULL, m_lineElemRef->GetElemID() );
if ( iStatus == SUCCESS )
{
printf("AssociationPt created, m_lastElemRef->GetElemID()=%ld\n",m_lineElemRef->GetElemID());
}
MSElement testEl=*m_eehFirstSymbol.GetElementCP();
mdlAssoc_insertPoint( &testEl, &assocPt, 0, 1 );
m_eehFirstSymbol.ReplaceElement( &testEl );
m_eehFirstSymbol.AddToModel ( ACTIVEMODEL );
I get the symbol (cell) written to the model with a Dependency Linkage, but the cell's display is "dashed" - representing there is something wrong with the association, I think. What is the proper way to achieve the association?
Thanks,
Bruce