From somesh_au at yahoo.com Mon Nov 6 05:12:40 2017 From: somesh_au at yahoo.com (Somesh Das) Date: Mon, 6 Nov 2017 11:12:40 +0000 (UTC) Subject: [gme-users] About Programatically Set Selection to an Object in GME In-Reply-To: <786069264.5439954.1509099716122@mail.yahoo.com> References: <1349796287.2392496.1508752481171.ref@mail.yahoo.com> <1349796287.2392496.1508752481171@mail.yahoo.com> <1496655790.4727377.1509009764722@mail.yahoo.com> <786069264.5439954.1509099716122@mail.yahoo.com> Message-ID: <876324933.2782404.1509966760841@mail.yahoo.com> Hi Kavin,I tried with single quotation instead of double quotation and wrote the following code:CString result ("" + text + ""); However in GME when I click on the link then it shows me an error "Could not complete operation due to error 87650036". I attached a screenshot of the error.  Thanks & Regards Somesh That On Friday, October 27, 2017, 12:21:56 PM GMT+2, Somesh Das wrote: Hi Kevin,I have already tried this but I got same error. Thanks & Regards Somesh Das On Thursday, October 26, 2017, 2:48:21 PM GMT+2, Kevin Smyth wrote: I think you need: result + = """ + objectId + """; // id of the object On Thu, Oct 26, 2017 at 4:22 AM, Somesh Das wrote: Hi Kevin,I tried the code you suggested as follows :CString    result (" "; result + = text; // name of the object result + = "";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. Thanks & Regards Somesh Das On Monday, October 23, 2017 8:27 PM, Kevin Smyth wrote: 1. You want the ShowFCO method on the GME interface (IGMEOleIt):[helpstring("ShowFCO - accepts relative path both up and down. For models only: If InParent == true shown selected in parent, otherwise opened.")]HRESULT ShowFCO( [in] BSTR path, [in, defaultvalue(0)] VARIANT_BOOL inParent ); You can get the GME interface from the project: project->GetClientByName(_ bstr_t(L"GME.Application"), &client) 2.Yes, that's what the hyperlinks do. You could try writing a link like model(I haven't tested this code. You may need to call ShowFCO outside the transaction) Kevin On Mon, Oct 23, 2017 at 4:54 AM, Somesh Das wrote: Hi,I am developing an interpreter for GME which will find out all objects connected with selected objects.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 HRESULT hres = decorator.CoCreateInstance(L" MGA.BoxDecorator" );decorator->Initialize(project- >getProjectI(), NULL,fco (intended fco));decorator->SetSelected(value); However this code is not working. 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 Console::Out::WriteLine( CString("-> Source: ") + Formatter:: MakeObjectHyperlink(CString( namePath.c_str()), CString(connEnd->getID().c_ str()))); 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. Please can anybody suggest me how to make a selection on an object Programatically. Thanks & Regards Somesh Das ______________________________ _________________ gme-users mailing list gme-users at list.isis. vanderbilt.edu http://list.isis.vanderbilt. edu/cgi-bin/mailman/listinfo/ gme-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From somesh_au at yahoo.com Tue Nov 7 03:57:14 2017 From: somesh_au at yahoo.com (Somesh Das) Date: Tue, 7 Nov 2017 09:57:14 +0000 (UTC) Subject: [gme-users] About Programatically Set Selection to an Object in GME In-Reply-To: References: <1349796287.2392496.1508752481171.ref@mail.yahoo.com> <1349796287.2392496.1508752481171@mail.yahoo.com> <1496655790.4727377.1509009764722@mail.yahoo.com> Message-ID: <538789314.3556907.1510048634815@mail.yahoo.com> Hi Kavin,I tried with single quotation instead of double quotation and wrote the following code:CString result ("" + text + ""); However in GME when I click on the link then it shows me an error "Could not complete operation due to error 87650036".I also tried with double quotation which also shows error.  I attached a screenshots of the errors.  Thanks & Regards  Somesh Das On Thursday, October 26, 2017, 2:48:21 PM GMT+2, Kevin Smyth wrote: I think you need: result + = """ + objectId + """; // id of the object On Thu, Oct 26, 2017 at 4:22 AM, Somesh Das wrote: Hi Kevin,I tried the code you suggested as follows :CString    result (" "; result + = text; // name of the object result + = "";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. Thanks & Regards Somesh Das On Monday, October 23, 2017 8:27 PM, Kevin Smyth wrote: 1. You want the ShowFCO method on the GME interface (IGMEOleIt):[helpstring("ShowFCO - accepts relative path both up and down. For models only: If InParent == true shown selected in parent, otherwise opened.")]HRESULT ShowFCO( [in] BSTR path, [in, defaultvalue(0)] VARIANT_BOOL inParent ); You can get the GME interface from the project: project->GetClientByName(_ bstr_t(L"GME.Application"), &client) 2.Yes, that's what the hyperlinks do. You could try writing a link like model(I haven't tested this code. You may need to call ShowFCO outside the transaction) Kevin On Mon, Oct 23, 2017 at 4:54 AM, Somesh Das wrote: Hi,I am developing an interpreter for GME which will find out all objects connected with selected objects.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 HRESULT hres = decorator.CoCreateInstance(L" MGA.BoxDecorator" );decorator->Initialize(project- >getProjectI(), NULL,fco (intended fco));decorator->SetSelected(value); However this code is not working. 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 Console::Out::WriteLine( CString("-> Source: ") + Formatter:: MakeObjectHyperlink(CString( namePath.c_str()), CString(connEnd->getID().c_ str()))); 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. Please can anybody suggest me how to make a selection on an object Programatically. Thanks & Regards Somesh Das ______________________________ _________________ gme-users mailing list gme-users at list.isis. vanderbilt.edu http://list.isis.vanderbilt. edu/cgi-bin/mailman/listinfo/ gme-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error_with_double_qoutation.jpg Type: image/jpeg Size: 79983 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error_with_single_qoutation.jpg Type: image/jpeg Size: 99516 bytes Desc: not available URL: From kevin.m.smyth at gmail.com Tue Nov 7 09:46:18 2017 From: kevin.m.smyth at gmail.com (Kevin Smyth) Date: Tue, 7 Nov 2017 09:46:18 -0600 Subject: [gme-users] About Programatically Set Selection to an Object in GME In-Reply-To: <538789314.3556907.1510048634815@mail.yahoo.com> References: <1349796287.2392496.1508752481171.ref@mail.yahoo.com> <1349796287.2392496.1508752481171@mail.yahoo.com> <1496655790.4727377.1509009764722@mail.yahoo.com> <538789314.3556907.1510048634815@mail.yahoo.com> Message-ID: Hi Somesh, Try gme.BeginTransaction() and gme.CommitTransaction() instead of the gme.MgaProject ones. Kevin On Tue, Nov 7, 2017 at 3:57 AM, Somesh Das wrote: > Hi Kavin, > I tried with single quotation instead of double quotation and wrote the > following code: > CString result (" (); gme.ShowFCO (gme.MgaProject.GetFCOByID ('id-0065-00000004'), true); > gme.MgaProject.CommitTransaction (); \ ">" + text + ""); > > However in GME when I click on the link then it shows me an error "Could > not complete operation due to error 87650036". > I also tried with double quotation which also shows error. I attached a > screenshots of the errors. > > > > Thanks & Regards > Somesh Das > > > > > > On Thursday, October 26, 2017, 2:48:21 PM GMT+2, Kevin Smyth < > kevin.m.smyth at gmail.com> wrote: > > > I think you need: > > result + = """ + objectId + """; // id of the object > > On Thu, Oct 26, 2017 at 4:22 AM, Somesh Das wrote: > > Hi Kevin, > I tried the code you suggested as follows : > CString result (" > result + = "gme.MgaProject. BeginTransactionInNewTerr (); gme.ShowFCO > (gme.MgaProject.GetFCOByID ("; > > result + = objectId; // id of the object > > result + = "), true); gme.MgaProject. CommitTransaction ();"; > > result + = "\"> "; > > result + = text; // name of the object > result + = ""; > 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. > > Thanks & Regards > Somesh Das > > > > On Monday, October 23, 2017 8:27 PM, Kevin Smyth > wrote: > > > 1. You want the ShowFCO method on the GME interface (IGMEOleIt): > [helpstring("ShowFCO - accepts relative path both up and down. For models > only: If InParent == true shown selected in parent, otherwise opened.")] > HRESULT ShowFCO( [in] BSTR path, [in, defaultvalue(0)] VARIANT_BOOL > inParent ); > > You can get the GME interface from the project: > > project->GetClientByName(_ bstr_t(L"GME.Application"), &client) > > 2. > Yes, that's what the hyperlinks do. You could try writing a link like href="javascript:gme. MgaProject. BeginTransactionInNewTerr(); > gme.ShowFCO(gme.MgaProject. GetFCOByID("id-0065- 000011"), true); > gme.MgaProject. CommitTransaction()">model > (I haven't tested this code. You may need to call ShowFCO outside the > transaction) > > Kevin > > > > On Mon, Oct 23, 2017 at 4:54 AM, Somesh Das wrote: > > Hi, > I am developing an interpreter for GME which will find out all objects > connected with selected objects. > 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 > > HRESULT hres = decorator.CoCreateInstance(L" MGA.BoxDecorator" ); > decorator->Initialize(project- >getProjectI(), NULL,fco (intended fco)); > decorator->SetSelected(value); > > However this code is not working. > > 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 > > Console::Out::WriteLine( CString("-> Source: ") + Formatter:: > MakeObjectHyperlink(CString( namePath.c_str()), CString(connEnd->getID().c_ > str()))); > > 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. > > Please can anybody suggest me how to make a selection on an object > Programatically. > > Thanks & Regards > Somesh Das > > > ______________________________ _________________ > gme-users mailing list > gme-users at list.isis. vanderbilt.edu > http://list.isis.vanderbilt. edu/cgi-bin/mailman/listinfo/ gme-users > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: