<div dir="ltr">Hi Somesh,<div><br></div><div>The decorator is responsible for determining where the ports are.</div><div><br></div><div>The default decorator has this code:</div><div><div>if ((*ii)->portPart->GetInnerPosition().x <= WIDTH_MODELSIDE ||</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>(*ii)->portPart->GetInnerPosition().x < lMax / 2)</div><div>{</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>mapPrefs[PREF_LABELLOCATION] = PreferenceVariant(m_bPortLabelInside ? L_EAST : L_WEST);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>m_LeftPorts.push_back((*ii)->portPart);</div><div>} else {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>mapPrefs[PREF_LABELLOCATION] = PreferenceVariant(m_bPortLabelInside? L_WEST: L_EAST);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">  </span>m_RightPorts.push_back((*ii)->portPart);</div><div>}</div></div><div><br></div><div>lMax is the maximum x location of the ports. WIDTH_MODELSIDE is 100.</div><div><br></div><div><br></div><div><br></div><div>You could also ask the decorator. The basic procedure.</div><div>Query your model's registry for "/decorator". If it doesn't exist, use "MGA.BoxDecorator" (the default decorator)</div><div>CoCreateInstance the decorator</div><div>Call decorator.Initialize</div><div>Call decorator.GetPorts (the decorator may choose to not display all ports)</div><div>Call decorator.GetPortLocation for each port</div><div><br></div><div>Hope that helps.</div><div>Kevin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 6, 2017 at 7:36 AM, Somesh Das <span dir="ltr"><<a href="mailto:somesh_au@yahoo.com" target="_blank">somesh_au@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:13px"><div id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_28189"><span>Hi,</span></div><div id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_28189" dir="ltr"><span id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_33168">I am developing an interpreter using BON2Component which will create connections between two selected Object's ports.</span></div><div id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_28189" dir="ltr"><span id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_33302">For this I need to get port location. I can get location of an object using method mentioned below</span></div><div id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_28189" dir="ltr"><span><br></span></div><div id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_28189" dir="ltr"><span id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_33303">BON::Point pt = BON::FCOExRegistryNode( fco ->getRegistry())->getLocation(<wbr>"");<br></span></div><div id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_28189" dir="ltr"><span><br></span></div><div id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_28189" dir="ltr">However, I need to determine which port is in left side and which is in right side of the model. It must be implemented somewhere in GME.</div><div id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_28189" dir="ltr">Please can anybody give me any suggestion how can I separate ports as left hand side and right hand side based on location ?</div><div id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_28189" dir="ltr"><br></div><div></div><div id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_28186"> </div><div class="m_-1949330891132187765signature" id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_28188"><font face="HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" size="2" id="m_-1949330891132187765yui_3_16_0_ym19_1_1488794170278_28187">Thanks & Regards<span class="HOEnZb"><font color="#888888"><br>Somesh Das<br><br></font></span></font></div></div></div><br>______________________________<wbr>_________________<br>
gme-users mailing list<br>
<a href="mailto:gme-users@list.isis.vanderbilt.edu">gme-users@list.isis.<wbr>vanderbilt.edu</a><br>
<a href="http://list.isis.vanderbilt.edu/cgi-bin/mailman/listinfo/gme-users" rel="noreferrer" target="_blank">http://list.isis.vanderbilt.<wbr>edu/cgi-bin/mailman/listinfo/<wbr>gme-users</a><br>
<br></blockquote></div><br></div>