|
int DPlot_ZFromXY(int Docnum, double X, double Y, double *Z);
Parameters
DocNum | Document index for a 3D plot returned by a previous call to DPlot_Plot (1-32). |
X, Y | Coordinates of the point on the surface for which you want the Z value. |
*Z | Address of the Z value. |
Return Values
-7 | Failure to initialize DDE. Should never happen, but if it does then rebooting may be necessary. |
-6 | Could not find DPlot. |
-5 | Failure to establish a conversation for Docnum, most likely because that document has been closed (or was never created). |
-4 | Invalid Docnum. |
-3 | Error requesting Z value from DPlot, most likely related to using an old version. DPlot_ZFromXY requires DPlot or DPlot Jr version 1.9.7 or later. |
-2 | Docnum is not a 3D surface plot. |
-1 | The point X, Y is outside the extents of the surface or inside an interior hole in the surface. |
1 | Success. |
Remarks
This function may be used for both 3D points on a rectangular grid and randomly-spaced 3D points. The view of the plot (2D or 3D) is irrelevant. DPlot finds the triangle that bounds the point X,Y then uses the plane equation of that triangle to solve for Z. For example usage see either the C ctest2 or VB btest2 example programs.
|
|