[gme-users] Add-on : how to visually mark a node programatically

Dan Simkins dan.simkins at workflow-science.com
Tue Mar 1 15:10:38 CST 2011


Hi Peter,

I can confirm from the Call Stack that it fails in BONImpl.cpp executing 
statement "COMCHECK2(pGME, pGME->ShowFCO(fco->getFCOI()));
"

I did try using showFCO in an BON2 interpreter, and it was successful - 
I don't know whether that helps or not ?

Please let me know if I can run any further tests.

Kind regards

Dan

On 01/03/2011 20:07, Peter Volgyesi wrote:
> Dan,
>
> It is rather hard to guess what went wrong. Could you step through
> your code (set a brakepoint right after "try" and use "step into" to
> see where it actually fails within BON.cpp or BONImpl.cpp) ?
> Thanks,
>
> --
> peter
>
>
>
> On Tue, Mar 1, 2011 at 7:12 AM, Dan Simkins
> <dan.simkins at workflow-science.com>  wrote:
>> Peter,
>>
>> Thanks for your suggestion; I have tried using showFCO in the following
>> fragment:
>>
>> void Component::objectEventPerformed( Object&  object, unsigned long
>> event, VARIANT v )
>> {
>>      // ======================
>>      // Insert application specific code here
>>      try
>>      {
>>          // Get the name of the object type (kind)
>>          std::string name = object->getObjectMeta().name() ;
>>
>>          if ( name == "Human" )
>>          {
>>              BON::FCO fco = object ;
>>
>>              if ( event == OBJEVENT_DESELECT )
>>              {
>>                  object->getProject()->showFCO( fco ) ;
>>              }
>>          }
>>      }
>>      catch ( BON::Exception e )
>>      {
>>          AfxMessageBox ( "Exception: " + CString(
>> e.getErrorMessage().c_str() ) ) ;
>>      }
>>      catch ( ... )
>>      {
>>          AfxMessageBox ( "Exception: Unknown" ) ;
>>      }
>> }
>>
>> I get an "object not found exception".
>>
>> I know I must be doing something silly, and would appreciate any
>> pointers in the right direction.
>>
>> I would also like to thank everyone else who responded !!!
>>
>> Kind regards
>>
>> Dan
>>
>> On 28/02/2011 17:20, Peter Volgyesi wrote:
>>> Check out
>>>
>>> project->showFCO(FCO fco);
>>>
>>> in BON2.
>>>
>>> --
>>> peter
>>>
>>>
>>>
>>> On Mon, Feb 28, 2011 at 10:47 AM, Matthew Eby<meby at isis.vanderbilt.edu>    wrote:
>>>> Also another option is to change the icon on your FCO using BON:
>>>>
>>>>          BON::FCO foo =
>>>> project->getRootFolder()->findByPath("/path/to/fco");
>>>>          foo->getRegistry()->setValueByPath("/icon", "newicon.bmp");
>>>>
>>>> newicon.bmp should be in your icons folder.
>>>>
>>>> -----Original Message-----
>>>> From: gme-users-bounces at list.isis.vanderbilt.edu
>>>> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Akos
>>>> Ledeczi
>>>> Sent: Monday, February 28, 2011 10:29 AM
>>>> To: dan.simkins at workflow-science.com; gme-users
>>>> Subject: Re: [gme-users] Add-on : how to visually mark a node
>>>> programatically
>>>>
>>>> No, you would have to do some COM programming.
>>>>
>>>> The easiest might be doing what the HFSM example distributed with GME
>>>> does. As the interpreter (I believe it is BON) executes the state
>>>> machine, it highlights the current state. Check out the code to see how
>>>> it's done.
>>>>
>>>> Good luck, Akos
>>>>
>>>> On 2/28/2011 10:18 AM, Dan Simkins wrote:
>>>>> Hi Akos,
>>>>>
>>>>> Thanks for your response ... is this available in the BON/BON2
>>>>> packages ... I am struggling to find the right method.
>>>>>
>>>>> Kind regards
>>>>>
>>>>> Dan
>>>>>
>>>>> On 28/02/2011 16:11, Akos Ledeczi wrote:
>>>>>> You can also select a node programatically via the GME COM interface
>>>>>> as if the user click on it.
>>>>>>
>>>>>> On 2/28/2011 10:03 AM, James H. Hill wrote:
>>>>>>> Hi Dan,
>>>>>>>
>>>>>>> On Feb 28, 2011, at 10:58 AM, Dan Simkins wrote:
>>>>>>>
>>>>>>>> Dear All,
>>>>>>>>
>>>>>>>> I am writing a Add-on and wish to visually mark a node somehow,
>>>> e.g.
>>>>>>>> under specific conditions, highlight a node on the diagram. Is this
>>>>>>>> possible to do programatically ? Any help or assistance or pointers
>>>>>>>> to documentation that would help, would be great.
>>>>>>>>
>>>>>>> This is possible using a GME decorator.
>>>>>>>
>>>>>>> HTH,
>>>>>>>
>>>>>>> James
>>>>>>>
>>>>>>>> Many thanks and kind regards
>>>>>>>>
>>>>>>>> D
>>>>>>>> _______________________________________________
>>>>>>>> gme-users mailing list
>>>>>>>> gme-users at list.isis.vanderbilt.edu
>>>>>>>> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>>>>>>> _______________________________________________
>>>>>>> gme-users mailing list
>>>>>>> gme-users at list.isis.vanderbilt.edu
>>>>>>> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>>>>>> _______________________________________________
>>>>>> gme-users mailing list
>>>>>> gme-users at list.isis.vanderbilt.edu
>>>>>> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>>>> _______________________________________________
>>>> gme-users mailing list
>>>> gme-users at list.isis.vanderbilt.edu
>>>> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>>>> _______________________________________________
>>>> gme-users mailing list
>>>> gme-users at list.isis.vanderbilt.edu
>>>> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>>>>
>>> _______________________________________________
>>> gme-users mailing list
>>> gme-users at list.isis.vanderbilt.edu
>>> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>> --
>> Dan Simkins
>> dan.simkins at workflow-science.com
>> +44 (0) 7976 979 656
>>
>> This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Workflow Science Ltd.
>>
>> If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone.
>> Please contact the sender if you believe you have received this email in error.
>>
>> Workflow Science Ltd, registered in England and Wales, Company Number 04248591
>>
>> _______________________________________________
>> gme-users mailing list
>> gme-users at list.isis.vanderbilt.edu
>> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>>

-- 
Dan Simkins
dan.simkins at workflow-science.com
+44 (0) 7976 979 656

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Workflow Science Ltd.

If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone.
Please contact the sender if you believe you have received this email in error.

Workflow Science Ltd, registered in England and Wales, Company Number 04248591



More information about the gme-users mailing list