Skip to main content

ModelCenter APIs 2025 R2

Interface PHXDATAHISTORYLib::PHXDataExplorerPlugIn

Last update: 16.07.2025

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

LPDISPATCH PHXDATAHISTORYLib::PHXDataExplorerPlugIn::getDataHistory()

Returns the IDispatch of the associated Data History object. Returns:

The IDispatch of the associated Data History object.

Return type: LPDISPATCH

Function setDataHistory

void PHXDATAHISTORYLib::PHXDataExplorerPlugIn::setDataHistory(LPDISPATCH dataHistory)

Passes the associated Data History for this page. Parameters:

  • dataHistory: The dataHistory object.

Parameters:

  • LPDISPATCH dataHistory

Return type: void

Function getModelCenter

LPDISPATCH PHXDATAHISTORYLib::PHXDataExplorerPlugIn::getModelCenter()

Returns the associated ModelCenter object, if one exists. Returns:

The associated ModelCenter object.

Return type: LPDISPATCH

Function setModelCenter

void PHXDATAHISTORYLib::PHXDataExplorerPlugIn::setModelCenter(LPDISPATCH modelCenter)

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

BSTR PHXDATAHISTORYLib::PHXDataExplorerPlugIn::getPageTitle()

Returns the page title. Returns:

The page title.

Return type: BSTR

Function toString

BSTR PHXDATAHISTORYLib::PHXDataExplorerPlugIn::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

void PHXDATAHISTORYLib::PHXDataExplorerPlugIn::fromString(BSTR str)

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

void PHXDATAHISTORYLib::PHXDataExplorerPlugIn::getMenuItems(LPDISPATCH iPHXMenuItem)

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

void PHXDATAHISTORYLib::PHXDataExplorerPlugIn::invokeMenuItem(long id)

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

boolean PHXDATAHISTORYLib::PHXDataExplorerPlugIn::isMenuItemEnabled(long id)

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

boolean PHXDATAHISTORYLib::PHXDataExplorerPlugIn::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

void PHXDATAHISTORYLib::PHXDataExplorerPlugIn::setStartContext(BSTR str)

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

BSTR PHXDATAHISTORYLib::PHXDataExplorerPlugIn::getThumbnail(BSTR hints)

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

Connect with Ansys