ph_getccobjgraphic PowerHome formula function
Description
Retrieves the current graphic file in use by a Control Center graphic object.
Syntax
ph_getccobjgraphic ( ai_type )
ph_getccobjgraphic ( as_tab, as_id, ai_type )
Argument Description
as_tab String (Optional). The tab ID containing the graphic object. If this parameter is omitted, the system variable CCTAB will be used
as_id String (Optional). The ID of the Control Center graphic object. If this parameter is omitted, the system variable CCOBJ will be used
ai_type Integer. The type of graphic file to be returned. Use 0 for the "up" graphic file, 1 for the "down" graphic file.
Return value
String. Returns the full path and filename of the specified graphic object. Returns "- 1" if the tab/object cannot be found.
Usage
Use this function to retrieve the graphic file for a Control Center graphic object on a CC tab. A typical use of this function would be to retrieve the current graphic file of a Control Center graphic object that was triggered and initiated an action such as a formula or macro. In that use case scenario, you can call the function without the as_tab and as_id parameters and the ID's for both the tab and object will be automatically supplied by the system variables. If you wish to get the graphic file for a CC graphic object other than one that initiated an action, you must use the syntax that includes the parameters for both the tab and object ID's
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_getccobjgraphic("FAMILYRM","FAMILYRMLIGHT",0) - Retrieves the "up" graphic file for the FAMILYRMLIGHT graphic CC object on the FAMILYRM tab