[gme-users] Add-on : how to visually mark a node programatically
Dan Simkins
dan.simkins at workflow-science.com
Tue Mar 1 07:12:04 CST 2011
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
More information about the gme-users
mailing list