Skip to main content
Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 882) An interface which represents a Data Explorer Page. An object must implement this interface in order to be displayed as a Data Explorer Page.

Members

Public functions

Function getDataHistory

Returns the IDispatch of the associated Data History object. Returns: The IDispatch of the associated Data History object. Return type: LPDISPATCH

Function setDataHistory

Passes the associated Data History for this page. Parameters:
  • dataHistory: The dataHistory object.
Parameters:
  • LPDISPATCH dataHistory
Return type: void

Function getModelCenter

Returns the associated ModelCenter object, if one exists. Returns: The associated ModelCenter object. Return type: LPDISPATCH

Function setModelCenter

Passes the associated ModelCenter object for this Plug-In. Plug-Ins should not expect this to be set and should fail gracefully with reduced functionality if an associated ModelCenter object is not available. Parameters:
  • modelCenter: The ModelCenter object.
Parameters:
  • LPDISPATCH modelCenter
Return type: void

Function getPageTitle

Returns the page title. Returns: The page title. Return type: BSTR

Function toString

Tells the Plug-In to save its current state into string form so that it can be saved with the file or put on the clipboard as a “Page Template”. Returns: The string representation of the Plug-In. Return type: BSTR

Function fromString

Tells this Data Explorer Plug-In to load its state from the given string. This data is used for saving/loading a Data Explorer Page and also for cut-n-paste of Data Explorer page templates, therefore the Plug-In should not expect that the data and Variable names in the associated Data History is the same as when the toString() method was called. Parameters:
  • str: The string to load. This will be passed unaltered from a previous call to toString().
Parameters:
  • BSTR str
Return type: void

Function getMenuItems

The Plug-In should fill in the passed in object with any context dependent menu items to put into the Page menu below all the standard items. Parameters:
  • iPHXMenuItem: An IPHXMenuItems object which should be filled in by the Plug-In.
Parameters:
  • LPDISPATCH iPHXMenuItem
Return type: void

Function invokeMenuItem

Tells the Plug-In that the user is attempting to invoke a menu item related to this page. Parameters:
  • id: May be one of the constants from the PXHMENU_PREDEFS enumeration or a 0 based index into the custom menu items that the Plug-In defined through the getMenuItems call.
Parameters:
  • long id
Return type: void

Function isMenuItemEnabled

This function should return whether the selected menu item is valid and should be enabled in the menu bar. Parameters:
  • id: May be one of the constants from the PXHMENU_PREDEFS enumeration or a 0 based index into the custom menu items that the Plug-In defined through the getMenuItems call.
Returns: True if valid/enabled, else false. Parameters:
  • long id
Return type: boolean

Function updateHint

This function is called just before a new thumbnail snapshot is taken. It is used by Plug-Ins which don’t update content when they are not visible or selected, but would like an opportunity to update before a thumbnail is drawn. Returns: False if an exception is thrown, else true. Return type: boolean

Function setStartContext

Passes in the “context” in which this plug-in is being invoked. The context is the name of the Plug-In as defined in ModelCenter’s Plug-In Manager, such as “2D Line”. This is useful when a single Plug-In has multiple behaviors. Parameters:
  • str: The start context.
Parameters:
  • BSTR str
Return type: void

Function getThumbnail

Called by the Data Explorer to get the name of a file that contains the thumbnail image. Parameters:
  • hints:
Returns: The name of the file containing the thumbnail image. Parameters:
  • BSTR hints
Return type: BSTR