Plex 2E

 View Only
  • 1.  Get state of an event

    Posted Jun 01, 2016 05:58 AM

    In action diagram there is a statement to set the state of an event, e.g.

    Set State Inactive, Event: Save Letter

    Is there a way to check what state an event is in? My guess is that it can be done using a WINAPI function. I looked at the Action Diagram Palette, and source code library, but could not yet find a way to do this. My colleagues also did not know how to achieve this.

     

    My scenario that I would like to set the state of another event to Inactive based on the state of another event.



  • 2.  Re: Get state of an event
    Best Answer

    Posted Jun 02, 2016 10:00 AM

    Check the same condition that sets the state of Event: Save Letter , while setting the state of another event.

     

    I guess event is linked to a button. Check the state of the button.

     

    iState = (int)SendMessage(hWnd, HBM_GETSTATE, 0, 0L);

    int iState    The current State value



  • 3.  Re: Get state of an event

    Posted Jun 02, 2016 10:18 AM

    Thank you.

     

    I'll give that a try the next time I have that kind of scenario.