isPanelInGedi()

The function returns TRUE when the panel where the function is used is open in GEDI.

Synopsis

bool isPanelInGedi();

Parameters

-

Return value

TRUE when the panel where the function is used is open in GEDI.

Error

-

Description

The function returns TRUE when the panel where the function is used is open in GEDI.

Example

The example shows the text "panel is open" when the panel where the code is used is open in the GEDI and FALSE when the panel is not open.

main(mapping event)


{


  if(isPanelInGedi())


  {


    PRIMITIVE_TEXT1.text("panel is open");


  }


  else


  {


    PRIMITIVE_TEXT1.text("panel is not open");


  }


}

isPanelInGedi can be, for example, be used when a data point element should be defined as a property. When a DPE should be set for an object, a dpConnect() must be executed. The value should, however, not be set in GEDI but first when the panel is opened at runtime in VISION.

#property string dpe


string dpe;


public setDpe(string d)


{


  dpe = d;


  if ( isPanelInGedi() )


    return;


  dpConnect("work", d);


}


public string getDpe() { return dpe; }


work(string dpe, int value)


{


  PRIMITIVE_TEXT1.text = (string)value;


}

Assignment

Graphics functions

Availability

UI