int cvxAppAction
(
   evxAppAction         type,    /* I: action type*/
   svxAppActionParam*   param    /* I: callback function */
)
/*
DESCRIPTION:
   Set a callback function. When processing the target application option,
the callback function will be called.
   If this function called many times with the same 'type', only
the last will take effect.
   If param->pfn is null, the original callback function, if there
exists, will be removed.
RETURN:
   1 if error, else 0.
WARNING:
   If one call this function to register a callback in a dll module,
he must call this function again, with argument param set as NULL,
to unregister the callback for each action before the dll module exit.
Usually we can do this in the exit function of the dll module.
*/
________________________________________________________________________________

void cvxAutoRegenGet
(
int *Status   /* O: 1 if "auto regen" is ON; 0 if OFF */
) 
/*
DESCRIPTION:
Gets the status of part "auto regen" (1=ON; 0=OFF).
*/
________________________________________________________________________________

void cvxAutoRegenSet
(
int Status   /* I: 1 if "auto regen" is ON; 0 if OFF */
) 
/*
DESCRIPTION:
Sets the status of part "auto regen" (1=ON; 0=OFF).
*/
________________________________________________________________________________

void cvxColorFilter
(
int colorIdx              /* I: the index of color filter */
)
/*
DESCRIPTION:
Set the color filter according to color index, this value is the index of color picker in ZW3D, and 
it should in the range of V_COLOR_NULL ~ V_COLOR_LAST, it will reset the filter to pick all if index is out of this range.
*/
________________________________________________________________________________

void cvxConfigGetColor
(
const char *Name, /* I: name of config file variable */
evxColor *Color   /* O: value of the specified variable */
)
/*
DESCRIPTION:
Outputs the value of a setting from the Configuration form/config
file.

VX_COLOR_BLACK is output if the variable value is not one of the
standard color names.

This function should not be used to get the color from a variable
whose value is a 3-integer RGB color.  Use the cvxConfigGetRgb()
function for variables whose values are defined by their RGB
components.
*/
________________________________________________________________________________

int cvxConfigGetInteger
(
const char *Name, /* I: name of config file variable */
int *Value        /* O: value of the specified variable */
)
/*
DESCRIPTION:
Outputs the value of a setting from the Configuration form/config
file.  The variable value is assumed to be an integer (0 is assigned
to "Value" when the value is not a number).

Returns 0 if the variable exists, otherwise returns 1 and sets "Value"
to 0.
*/
________________________________________________________________________________

int cvxConfigGetNumber
(
const char *Name, /* I: name of config file variable */
double *Value     /* O: value of the specified variable */
)
/*
DESCRIPTION:
Outputs the value of a setting from the Configuration form/config
file.  The variable value is assumed to be a number (0 is assigned to
"Value" when the value is not a number).

Returns 0 if the variable exists, otherwise returns 1 and sets "Value"
to 0.
*/
________________________________________________________________________________

int cvxConfigGetOption
(
const char *Name,   /* I: name of config file variable */
const char *Options /* I: 0-terminated, comma-delimited allowed values */
)
/*
DESCRIPTION:
Given the variable name of a setting in the config file, look up the
variable and compare its value as a string to the sub-strings
contained in the comma-delimited "Options" string, and return the
index (numbered from 1) of the matching sub-string.  The string
comparison is case-insensitive.  Return 0 if either the variable or
sub-string cannot be found.

For example, if "Options" is "mm,meter,mil,inch" and the value of the
config file variable of interest is "meter", this function will return
2.  If the value of the config file variable is "foot", this function
will return 0.

The "Options" string should have no more than 32 sub-strings, no
sub-string should be longer than 31 bytes, and the sub-strings should
not contain blank spaces.  If "Options" has more than 32 sub-strings,
only the first 32 will be compared to the variable value.  If any
sub-string is longer than 31 bytes, only its first 31 bytes will be
compared to the variable value (the variable value must also be 31
bytes or less).
*/
________________________________________________________________________________

int cvxConfigGetRgb
(
const char *Name, /* I: name of config file variable */
svxColor *Rgb     /* O: value of the specified variable */
)
/*
DESCRIPTION:
Outputs the value of a setting from the Configuration form/config
file.  The variable value is assumed to be the RGB components of a
color, i.e. a comma-separated list of 3 integers between 0 and 255.

This function should not be used to get the color from a variable
whose value is one of the standard color names rather than a 3-integer
RGB color.  Use the cvxConfigGetColor() function for variables whose
values are color names.

Returns 0 if the variable exists and has a value of 3 integers,
otherwise returns 1 and sets "Rgb" to 0,0,0 (black).
*/
________________________________________________________________________________

int cvxConfigGetString
(
const char *Name, /* I: name of config file variable */
char *Str,        /* O: 0-terminated value of the specified variable */
int nBytes        /* I: size of Str array in bytes */
)
/*
DESCRIPTION:
Outputs the value of a setting from the Configuration form/config
file.  The variable value is simply copied as a string to "Str".  If
the value is longer than nBytes-1, the value is truncated to fit
"Str".

Returns 0 if the variable exists, otherwise returns 1 and outputs an
empty string.
*/
________________________________________________________________________________

int cvxConfigGetYesNo
(
const char *Name, /* I: name of config file variable */
int *YesNo        /* O: 1 if value is "Yes", 0 if value is "No" */
)
/*
DESCRIPTION:
Outputs the value of a setting from the Configuration form/config
file.  The variable value must be one of the strings "Yes" or "No"
(case is ignored).  If the value is "Yes", 1 is output.  If the value
is "No", 0 is output.

Returns 0 if the variable exists and has a value that is either "Yes"
or "No", otherwise returns 1 and sets the output to 0.
*/
________________________________________________________________________________

int cvxConfigPathGet
(
   vxPath path  /* O: config path*/
)
/*
DESCRIPTION:
   Get config path for api developer.
   Api developers should save their config files here, if they have.
RETURN:
   0 if success, otherwise 1.
*/
________________________________________________________________________________

int cvxConfigSetColor
(
const char *Name,    /* I: name of config file variable */
evxColor Color       /* I: value of the specified variable */
)
/*
DESCRIPTION:
Sets the value of a setting from the Configuration form/config
file.

This function should not be used to set the color from a variable
whose value is a 3-integer RGB color.  Use the cvxConfigSetRgb()
function for variables whose values are defined by their RGB
components.
*/
________________________________________________________________________________

int cvxConfigSetInteger
(
const char *Name, /* I: name of config file variable */
int Value         /* I: value of the specified variable */
)
/*
DESCRIPTION:
Sets the value of a setting from the Configuration form/config
file.  The variable value is assumed to be an integer (0 is assigned
to "Value" when the value is not a number).

Returns 0 if data found for the key, else 1.
*/
________________________________________________________________________________

int cvxConfigSetNumber
(
const char *Name,    /* I: name of config file variable */
double Value         /* I: value of the specified variable */
)
/*
DESCRIPTION:
Sets the value of a setting from the Configuration form/config
file.  The variable value is assumed to be a number (0 is assigned to
"Value" when the value is not a number).

Returns 0 if data found for the key, else 1.
*/
________________________________________________________________________________

int cvxConfigSetOption
(
const char *Name,      /* I: name of config file variable */
const char *Option     /* I: value of the specified variable */
)
/*
DESCRIPTION:
Sets the value of a setting from the Configuration form/config file.

The "Option" should not be longer than 31 bytes, and it should
not contain blank spaces.

Returns 0 if data found for the key, else 1.
*/
________________________________________________________________________________

int cvxConfigSetRgb
(
const char *Name,    /* I: name of config file variable */
svxColor *Rgb        /* I: value of the specified variable */
)
/*
DESCRIPTION:
Sets the value of a setting from the Configuration form/config
file.  The variable value is assumed to be the RGB components of a
color, i.e. a comma-separated list of 3 integers between 0 and 255.

This function should not be used to set the color from a variable
whose value is one of the standard color names rather than a 3-integer
RGB color.  Use the cvxConfigSetColor() function for variables whose
values are color names.

Returns 0 if data found for the key, else 1.
*/
________________________________________________________________________________

int cvxConfigSetString
(
const char *Name,   /* I: name of config file variable */
char *Str           /* I: value of the specified variable */
)
/*
DESCRIPTION:
Sets the string value of a setting from the Configuration form/config
file. 
Returns 0 if data found for the key, else 1.
*/
________________________________________________________________________________

int cvxConfigSetYesNo
(
const char *Name,    /* I: name of config file variable */
int YesNo            /* I: value of the specified variable */
)
/*
DESCRIPTION:
Sets the value of a setting from the Configuration form/config
file. The variable value must be one of the strings "Yes" or "No"
(case is ignored).
1-Yes, 0-No.

Returns 0 if data found for the key, else 1.
*/
________________________________________________________________________________

int cvxFilterActiveGet
(
vxName Filter      /* O: the name of current active filter */
)
/*
DESCRIPTION:
Get current active filter name.

Return 1 if error, else 0.
*/
________________________________________________________________________________

void cvxFilterListGet
(
int *count,              /* O: the count of filters */
vxName *filterList       /* O: list of filters' names, request vxName[30]*/
)
/*
DESCRIPTION:
Get a list of filters' names.
*/
________________________________________________________________________________

void cvxFontMap
(
const char* zw3dFont,  /* i: font name of zw3d */
vxLongName mapFont     /* o: mapped font name */
)
/*
DESCRIPTION:
Map the zw3d font name to the general font.
Such as:
       "ZW3D Simplex" - "simplex";
       "ZW3D Simplex Roman" - "romans";
       "ZW3D Complex Roman" - "romanc";
       "ZW3D Duplex Roman" - "romand";
       "ZW3D Triplex Roman" - "romant";
       "ZW3D Simplex Script" - "scripts";
       "ZW3D Complex Script" - "scriptc";
       "ZW3D Simplex Greek" - "greeks";
       "ZW3D Complex Greek" - "greekc";
       "ZW3D Gothic German" - "gothicg";
       "ZW3D Gothic Italian" - "gothici";
       "ZW3D Gothic English" - "gothice";
       "ZW3D Complex Italics" - "italicc";
       "ZW3D Triplex Italics" - "italict";
       "ËÎÌå" - "SimSun";
*/
________________________________________________________________________________

int cvxGlobalGet
(
evxGlobal Global,      /* I: global setting to modify */
void *Data            /* O: data to assign to global setting */
)
/*
DESCRIPTION:
Retrieves the value of the specified setting.
To accomodate different data types, "Data" is a void pointer.
Make sure it references the appropriate storage type.  Look at 
"enum evxGlobal" to see what type of storage is required for each
setting.

Returns 1 if function fails; 0 if it succeeds.
*/
________________________________________________________________________________

int cvxGlobalSet
(
evxGlobal Global,      /* I: global setting to modify */
void *Data            /* I: data to assign to global setting */
)
/*
DESCRIPTION:
Assigns the specified data to the specified setting.
To accomodate different data types, "Data" is a void pointer.
Make sure it references the appropriate data type.  Look at 
"enum evxGlobal" to see what type of data is required for each
setting.

Be careful using this function to change global settings.  It is only 
meant for temporary modification of a setting while an API function is 
executing.   Always restore the original setting when your function is
done.

Returns 1 if function fails; 0 if it succeeds.
*/
________________________________________________________________________________

void cvxHostId 
(
double *idNetwork,   /* O: decimal encoded network id */
double *idDongle   /* O: decimal encoded dongle id */
)
/*
DESCRIPTION:
Outputs the network card id and/or dongle id of the host
computer for the instance of ZW3D currently executing.

Note - Dongle id is not supported from version 14.6 onward.

Outputs zero for an undefined ID.
*/
________________________________________________________________________________

int cvxLabelMatch
(
int *Label1, /* I: first persistent label (null-terminated integer array) */
int *Label2  /* I: second persistent label (null-terminated integer array) */
) 
/*
DESCRIPTION:
Returns 0 if the input labels do not match, 1 if they are the same and 2
if they are a "close" match.
*/
________________________________________________________________________________

void cvxLangGet
(
vxName Language   /* O: name of active language */
)
/*
DESCRIPTION:
Outputs the name of the active language.  The following
are supported language names: Danish, Dutch, English, 
French, German, Italian, Japanese, Korean, Portuguese,
Spanish, Chinese-simplified.936, Chinese-traditional.950,
Chinese.936, Thai.874, Greek.1253, Finnish
*/
________________________________________________________________________________

int cvxLicActivate
(
const char* pzEntitlement /* I: the license entitlement. */
)
/*
DESCRIPTION:
Activate license by entitlement.
RETURN:
0        - Activate successfully.
nonzero  - failed.
*/
________________________________________________________________________________

int cvxLicEvaluationGet
(
char szEvaluation[36]     /* O: currently not used, leave it as NULL */
)
/*
DESCRIPTION:
Get days before trial license expired.
RETURN:
> 0 number of days before trial license expired.
= 0 the trial license has been expired.
< 0 fail to get expire days.
*/
________________________________________________________________________________

int cvxLicIdentifierGet
(
char szIdentifier[36]     /* O: the license identifier string. */
)
/*
DESCRIPTION:
Get current valid license identifier string.
RETURN:
0        - Get successfully.
nonzero  - failed.
*/
________________________________________________________________________________

int cvxLicModulesGet
(
char szModules[1024]     /* O: the module name list to be return.(e.g. "module1, module2, module3"). */
)
/*
DESCRIPTION:
Get current authorized module list, the "szModules" is split by comma, e.g. "module1, module2, module3".
RETURN:
0        - Get successfully.

nonzero  - The current license check failed, get the trail license name.
*/
________________________________________________________________________________

int cvxLicTypeCheck()
/*
DESCRIPTION:
Check the current authorization type.
It can check the type except when using trial license.
RETURN:
0  The current authorization type is Soft-key license.(include Soft-key Singleton license and Floating license)
1  The current authorization type is Dongle license.
-1 Check failed.
*/
________________________________________________________________________________

void cvxNewCommand(void)
/*
DESCRIPTION:
Displays buffered error messages and resets the GUI to
prompt the user for a new command.  Generally you would
call this function at the end of your custom API code 
before returning control to ZW3D -- unless your code is
automatically called by a custom command template.
*/
________________________________________________________________________________

int cvxNoteGet
(
char **Note   /* O: null-terminated text string */
)
/*
DESCRIPTION:
Retrieves the "Notes" associated with the active root
object (or the active file if no root is active) and
outputs them via "Notes".   The memory referenced by
"Note" is allocated by this function and must be 
deallocated by the calling procedure.

If there are not any notes, no memory is allocated
by this function, and "*Note" is set to NULL.

Returns 1 if function fails; 0 if it succeeds.
*/
________________________________________________________________________________

int cvxNoteSet
(
char *Note   /* I: null-terminated text string */
)
/*
DESCRIPTION:
Assigns the specified text to the "Notes" associated
with the active root object -- or to the active file 
there is not an active root object.

Returns 1 if function fails; 0 if it succeeds.
*/
________________________________________________________________________________

void cvxNotifyExit
(
int opt  /*I: whether inform the user that zw3d will exit. 0-no, 1-yes*/
)
/*
DESCRIPTION:
   Notify zw3d to exit.
*/
________________________________________________________________________________

int cvxOpCount (void)
/*
DESCRIPTION:
Returns the current number of operations in the current transaction.
This number is passed to cvxEntNew() or cvxEntNewList() as a 
reference point for finding entities created after completion of a
particular operation.
*/
________________________________________________________________________________

int cvxPluginRegPathGet
(
   vxPath **pathList,  /*O: plugin path, an array*/
   int *pCnt,        /*O: count of pathList*/
   int is64          /*I: if 0, paths of 32-bit plugin are acquired, else 64-bit plugin path*/
)
/*
DESCRIPTION:
   Get plugin path of ZW3D in regedit.
RETURN:
   1 if error, otherwise 0.
CAVEAT:
   Release memory of pathList is the caller's responsibility.
   There is an example named 'DllRegister' in ApiExample.
*/
________________________________________________________________________________

void cvxSetMSMMoldInstalled
(
int IsInstalled    /* I: 1 if Misumi Mold is installed, 0 otherwise */
)
/*
DESCRIPTION
Set the value of the Misumi Mold installed mark "VgMoldInstalled".
*/
________________________________________________________________________________

void cvxSetMSMPressInstalled
(
int IsInstalled    /* I: 1 if Misumi Press is installed, 0 otherwise */
)
/*
DESCRIPTION
Set the value of the Misumi Press installed mark "VgPressInstalled".
*/
________________________________________________________________________________

void cvxShowDisp
(
int SlideNumber   /* I: Show-n-Tell slide number ( >= 1) */
) 
/*
DESCRIPTION:
Displays the specified "Show-n-Tell" slide, numbered from 1.
*/
________________________________________________________________________________

void cvxShowOpen
(
vxPath File      /* I: path to Show-n-Tell file */
) 
/*
DESCRIPTION:
Loads the specified "Show-n-Tell" file.
Use cvxShowDisplay() to activate a specific "Show-n-Tell" slide.
*/
________________________________________________________________________________

void cvxUndoBundleEnd
(
int RefreshDisplay,   /* I: 1 to refresh the display, else 0 */
int Settings[],      /* I: array of 8 integer settings output by cvxUndoBundleStart() */
int isError            /* I: 1 if there was an error during the transaction, else 0 */
)
/*
DESCRIPTION:
Terminates undo-redo transaction bundling initiated by a previous call to 
cvxUndoBundleStart(). Refreshes the display if "Redraw" is non-zero. 
This function MUST ALWAYS be paired with a call to cvxUndoBundleStart()
and absolutely requires the "Settings" output by cvxUndoBundleStart() 
as input in order to properly restore the original settings.

If a custom operation is not active at the time this function is
called, the current undo-redo transaction will be closed.
*/
________________________________________________________________________________

void cvxUndoBundleStart
(
int DisableManager,  /* I: 1 to disable update of the Manager form, else 0 */
int Settings[]         /* I/O: pointer to an empty array of 8 integers */
)
/*
DESCRIPTION:
This function causes subsequent undo-redo transactions to be
bundled into one transaction with display update disabled.
The input array "Settings" is used to back up settings modified
by this function.  This function MUST ALWAYS be paired with a
subsequent call to cvxUndoBundleEnd() which requires "Settings"
as input.

If a custom operation is not active at the time this function is
called, a new undo-redo transaction will automatically be initiated.
*/
________________________________________________________________________________

int cvxUndoRedo
(
int Undo           /* I: 1-undo, 0-redo */
)
/*
DESCRIPTION:
If "Undo" is non-zero, undo the last operation.
If "Undo" is zero, redo the last undone operation.
Returns 1 if function fails; 0 if it succeeds.
*/
________________________________________________________________________________

int cvxUndoRedoMarker
(
vxName Name      /* O: name of undo-redo transaction marker */
)
/*
DESCRIPTION:
Creates and logs an undo-redo transaction with a unique name,
which is output via "Name".  The transaction is essentially
empty, but serves as a marker in the undo-redo transaction
list. The marker can be passed to cvxUndoRedoTo() to undo or redo
all transactions up to, and including, the marker.

This function will cause any recently-logged database operations
to be flushed to an undo-redo transaction linked to the last-logged
transaction.

This function assumes "Name" is a character pointer to at least
sizeof(vxName) bytes of memory allocated by the calling procedure.

Returns 1 if function fails; 0 if it succeeds.

Also see cvxCmdMarker().
*/
________________________________________________________________________________

int cvxUndoRedoTo
(
int Undo,           /* I: 1-undo, 0-redo */
vxName Name       /* I: undo-redo transaction name */
)
/*
DESCRIPTION:
Undo/redo up to, and including, the specified transaction --
or to the start/end of the undo-redo transaction list --
whichever is encountered first.

Returns 1 if function fails; 0 if it succeeds.

Also see cvxCmdMarker().
*/
________________________________________________________________________________

void cvxUnitGet
(
evxUnitType *Type,   /* O: active linear units type */
vxName Name          /* O: abbreviation for active units (NULL to ignore) */
)
/*
DESCRIPTION:
Outputs an integer id that identifies the active user units for linear
measure (0-microns, 1-millimeters, 2-centimeters, 3-meters, 4-inches, 5-feet).

If "Name" is not NULL, it is used to output an abbreviation for the name 
of the active units.
*/
________________________________________________________________________________

void cvxUnitSet
(
evxUnitType Type      /* I: linear unit type */
)
/*
DESCRIPTION:
Sets the active user units for linear measure based on the input "Type"
(0-microns, 1-millimeters, 2-centimeters, 3-meters, 4-inches, 5-feet).
*/
________________________________________________________________________________

void cvxUnitToSys
(
double *Distance   /* I/O: distance */
)
/*
DESCRIPTION:
Converts specified distance from the active user units 
to system units (millimeters).
*/
________________________________________________________________________________

void cvxUnitToUser
(
double *Distance   /* I/O: distance */
)
/*
DESCRIPTION:
Converts the specified distance from system units (millimeters) 
to the active user units.
*/
________________________________________________________________________________

void cvxUnitTypeGet
(
char *unit_str,   /* i: the string of unit */
char *sub_type,   /* o: the string of sub type,0/1/2:Constant/Length/Angle */
char *unit_type   /* o: the string of unit type,Length(1~9):mic/mm/cm/dm/m/mil/in/ft/yd;Angle(1~2):radians/degrees */
)
/*
DESCRIPTION:
Get the unit type and sub type for the specified unit string .
*/
________________________________________________________________________________

int cvxVersion 
(
char *vxStatus   /* O: status */
)
/*
DESCRIPTION:
Returns the active ZW3D version number as an integer (one-hundreths).
If "vxStatus" is not NULL, a string describing the version is output
that indicates whether it is Alpha or Beta along with a revision
number.  If "vxStatus" is not NULL, it should point to at least 80
bytes of memory.
*/
________________________________________________________________________________

void cvxVersionNum
(
vxLongName verNum  /* O: version number */
)
/*
DESCRIPTION:
Get version number string of ZW3D. 
This is the VERNUM date and internal version number that ZW3D displays in its "About" box to identify a specify build of ZW3D.
See the cvxVersion function to get the current release number for the version of ZW3D that is in use.
*/
________________________________________________________________________________

void cvxXnBundle
(
int iCount,            /* i : special step count */
const char* xn_name    /* i : transaction name */
)
/*
DESCRIPTION:
Bundle some operator to a list.

PURPOSE:
Next transaction will bundle these operator
*/
________________________________________________________________________________

int cvxXnUndoCount()
/*
DESCRIPTION:
Get the undo step count
*/
________________________________________________________________________________