Creo VB API provides functions to control Creo windows. Here I’m gonna show how to do the basic window operation such as clear window, close window, refresh window and repaint window.
To activate the window we can use Activate() function from Ipfcwindow class in VB API. This method only works in asynchronous graphics mode. It will throw IpfcXToolkitBadContext exception if called in the non-graphic mode. Since it also very basic operation in window control I’m just giving the intro of this. For detailed explanation of how to activate a specific window see the article How to list out and activate a specific window.
To clear everything in the required window we can use clear() function from Ipfcwindow class in VB API. Here the sample code to clear the Current window
To repaint the required window we can use Repaint() function from Ipfcwindow class in VB API. This is especially used to updated the views in Creo window
To refresh the window content we can use Refresh() function from Ipfcwindow class in VB API
To remove a window from the Creo screen we can user Close() function from Ipfcwindow class. If it is the base window then Creo clears everything in the base window
Caution: Any work done since the last save will be lost
Hope I covered all the basic window operations.
Thanks & Regards