<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1509009322897_2889"><span><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">Hi Kevin,</font></font></span></div><div id="yui_3_16_0_ym19_1_1509009322897_2889" dir="ltr"><span id="yui_3_16_0_ym19_1_1509009322897_7338"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_7337"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_7336"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_7335"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_7334">I tried the code you suggested as follows :</font></font></font></font></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3067"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3166"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3165">CString    result ("<a href = \" javascript: ");</font></font></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3072"><br id="yui_3_16_0_ym19_1_1509009322897_3073"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3074"><span style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1509009322897_3075">         </span><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3138"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3137">result + = "gme.MgaProject.BeginTransactionInNewTerr (); gme.ShowFCO (gme.MgaProject.GetFCOByID (";</font></font></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3076"><br id="yui_3_16_0_ym19_1_1509009322897_3077"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3078"><span style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1509009322897_3079">          </span><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3136"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3135">result + = objectId; // id of the object</font></font></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3080"><br id="yui_3_16_0_ym19_1_1509009322897_3081"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3082"><span style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1509009322897_3083">               </span><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3134"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3133">result + = "), true); gme.MgaProject.CommitTransaction ();";</font></font></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3084"><br id="yui_3_16_0_ym19_1_1509009322897_3085"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3086"><span style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1509009322897_3087">         </span><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3152"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3151">result + = "\"> ";</font></font></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3088"><br id="yui_3_16_0_ym19_1_1509009322897_3089"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3090"><span style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1509009322897_3091">           </span><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3150"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3149">result + = text; // name of the object</font></font></div><div id="yui_3_16_0_ym19_1_1509009322897_2889" dir="ltr"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"></font></font></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3092"><span style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1509009322897_3093">               </span><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3148"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3147">result + = "</a>";</font></font></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509009322897_3092"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3399"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3398"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3397"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_3396">But in GME when I click on the hyperlink its showing a script error. I attached the screen shot of the error. Please let me know if I am doing any mistake.</font></font></font></font></div><div></div><div id="yui_3_16_0_ym19_1_1509009322897_2890"> </div><div class="signature" id="yui_3_16_0_ym19_1_1509009322897_2802"><font face="HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" size="2" id="yui_3_16_0_ym19_1_1509009322897_5713"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_5712"><font style="vertical-align: inherit;" id="yui_3_16_0_ym19_1_1509009322897_5711">Thanks & Regards </font></font><br><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">Somesh Das</font></font><br><br></font></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Monday, October 23, 2017 8:27 PM, Kevin Smyth <kevin.m.smyth@gmail.com> wrote:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv8847876194"><div><div dir="ltr">1. You want the ShowFCO method on the GME interface (IGMEOleIt):<div><div>[helpstring("ShowFCO - accepts relative path both up and down. For models only: If InParent == true shown selected in parent, otherwise opened.")]</div><div>HRESULT ShowFCO( [in] BSTR path, [in, defaultvalue(0)] VARIANT_BOOL inParent );</div></div><div><br clear="none"></div><div>You can get the GME interface from the project:</div><div><br clear="none"></div><div>project->GetClientByName(_bstr_t(L"GME.Application"), &client)<br clear="none"></div><div><br clear="none"></div><div>2.</div><div>Yes, that's what the hyperlinks do. You could try writing a link like <a href="javascript:gme.MgaProject.BeginTransactionInNewTerr(); gme.ShowFCO(gme.MgaProject.GetFCOByID(&quot;id-0065-000011&quot;), true); gme.MgaProject.CommitTransaction()">model</a></div><div>(I haven't tested this code. You may need to call ShowFCO outside the transaction)</div><div><br clear="none"></div><div>Kevin</div><div><br clear="none"></div><div><br clear="none"></div></div><div class="yiv8847876194gmail_extra"><br clear="none"><div class="yiv8847876194gmail_quote">On Mon, Oct 23, 2017 at 4:54 AM, Somesh Das <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:somesh_au@yahoo.com" target="_blank" href="mailto:somesh_au@yahoo.com">somesh_au@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv8847876194gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv8847876194yqt3986859283" id="yiv8847876194yqt89494"><div><div style="color:#000;background-color:#fff;font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;"><div id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_2585"><span>Hi,</span></div><div id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_2585"><span id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_18947">I am developing an interpreter for GME which will find out all objects connected with selected objects.</span></div><div id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_2585">For this purpose I need set selection on a set of objects in GME. I tried to get the default decorator for GME and tried the following code</div><div id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_2585"><br clear="none"></div><div id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_18968">HRESULT hres = decorator.CoCreateInstance(L" MGA.BoxDecorator" );</div><div dir="ltr" id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_18969">decorator->Initialize(project- >getProjectI(), NULL,fco (intended fco));</div><div dir="ltr" id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_18971">decorator->SetSelected(value);</div><div></div><div id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_15555"> </div><div id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_15555">However this code is not working.</div><div id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_15555"><br clear="none"></div><div id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_15555">Actually my intention is to make a hyperlink of all connected fco. If user clicks on the hyperlink then corresponding fco will be shown up and tried the following code</div><div id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_15555"><br clear="none"></div><div dir="ltr" id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_15555">Console::Out::WriteLine( CString("-> Source: ") + Formatter:: MakeObjectHyperlink(CString( namePath.c_str()), CString(connEnd->getID().c_ str())));<br clear="none"></div><div dir="ltr" id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_15555"><br clear="none"></div><div dir="ltr" id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_15555">For Atom this code is working but if the connected fco is model then if select the hyperlink then its going inside the model which is not my intend. I want to make selection only.</div><div dir="ltr" id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_15555"><br clear="none"></div><div dir="ltr" id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_15555">Please can anybody suggest me how to make a selection on an object Programatically.</div><div dir="ltr" id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_15555"><br clear="none"></div><div class="yiv8847876194m_-7005399429603231165signature" id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_15556"><font id="yiv8847876194m_-7005399429603231165yui_3_16_0_ym19_1_1508750509526_19210" face="HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" size="2">Thanks & Regards<span class="yiv8847876194HOEnZb"><font color="#888888"><br clear="none">Somesh Das<br clear="none"><br clear="none"></font></span></font></div></div></div></div><br clear="none">______________________________ _________________<br clear="none">
gme-users mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:gme-users@list.isis.vanderbilt.edu" target="_blank" href="mailto:gme-users@list.isis.vanderbilt.edu">gme-users@list.isis. vanderbilt.edu</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://list.isis.vanderbilt.edu/cgi-bin/mailman/listinfo/gme-users">http://list.isis.vanderbilt. edu/cgi-bin/mailman/listinfo/ gme-users</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div><br><br></div>  </div> </div>  </div></div></body></html>