Interface: Customized Plot Driver
This section describes the customized plot driver functions supported by Creo TOOLKIT .
Using the Plot Driver Functionality
The functions described in this section enable you to plot the two-dimensional entities, such as, lines, circles, arcs, and text that are used by Creo Parametric. These functions enable you to implement a customized plot format in Creo Parametric. You can do this by providing your own function for plotting each of the two-dimensional entities and then binding them to Creo Parametric so that it uses these functions to plot the contents of the object currently in session.
The following restrictions apply while using this functionality:
1. You cannot plot shaded models using these functions. This applies to plots of models generated from 3D model modes as well as shaded drawing views.
2. The contents of OLE objects embedded in drawings will not be included in the output.
3. Text contents provided to the implementation may include special Creo Parametric symbols. The Creo TOOLKIT application must transform this text into something that can be displayed correctly in the output format.
4. User defined plotter formats registered using the functions listed here will not be accessible from the Creo Parametric Print dialog box, or from the Creo TOOLKIT function ProPrintExecute(). In order to export the model with this custom plot driver, you must use ProPlotdriverExecute().
Functions Introduced:
The function ProPlotdriverInterfaceCreate() searches for a plot interface with a specified name. If the interface does not exist, then the function creates a new interface with this name. Each plot format that you define must have a unique name. This name is referenced in calls to other functions described in this section.
The function ProPlotdriverInterfaceobjectsSet() specifies the types of objects that are supported by a particular plot format. Specify a list of file extensions, such as, prt, drw, asm, and so on, that define the types of object to plot.
Use the ProPlotdriver functions to plot circles, lines, arcs, polygons, polylines, and text. These functions accept as input a call back function whose signature matches the call backs specified in the table below. The input arguments of the call back function describe the actual entity to be plotted.
The following table lists the names of the plot functions and their corresponding call backs. For example, use the function ProPlotdriverLinefunctionSet() to plot a line. The function accepts as input a call back function whose signature matches ProPlotdriverLinePlot(). The input arguments of the function ProPlotdriverLinePlot() define the line to be plotted.
Plot Function
Call Back Function
ProPlotdriverArcfunctionSet()
ProPlotdriverArcPlot()
ProPlotdriverCirclefunctionSet()
ProPlotdriverCirclePlot()
ProPlotdriverLinefunctionSet()
ProPlotdriverLinePlot()
ProPlotdriverPolygonfunctionSet()
ProPlotdriverPolygonPlot()
ProPlotdriverPolylinefunctionSet()
ProPlotdriverPolylinePlot()
ProPlotdriverTextfunctionSet()
ProPlotdriverTextPlot()
The function ProPlotdriverExecute() is used to invoke the user-defined plot on the current object.
Example 1: Sample Plot Driver Program
The sample code in UgPlotUse.c located at <creo_toolkit_loadpoint>/protk_appls/pt_userguide/ptu_plot shows how to use the customized plot driver functions.