int cvxDataClear ( int idData, /* I: id of data container (i.e. VDATA) */ int idField /* I: id of data field */ ) /* DESCRIPTION: Deletes data associated with the specified field (idField) of the specified data container (idData). Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataDel ( int idData, /* I: id of data container (i.e. VDATA) */ int idField /* I: id of data field */ ) /* DESCRIPTION: Delete the data associated with the specified field of the specified data container. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataDelItem ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int iEnt /* I: entity to delete */ ) /* DESCRIPTION: Delete specified input data item associated with the specified field (data_id) of the specified VDATA object (idx_data) which is assumed to reside in PRJ_BIN. Return 1 if error, else 0. */ ________________________________________________________________________________ int cvxDataDelUnHi ( int idData, /* I: id of data container (i.e. VDATA) */ int idField /* I: id of data field */ ) /* DESCRIPTION: Delete the data associated with the specified field of the specified data container. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataFree ( int idData /* I: id of data container (i.e. VDATA) */ ) /* DESCRIPTION: Deletes a data container created by cvxDataInit(), freeing the memory associated with it. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGet ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ svxData *Data /* O: first data item associated with "idField" */ ) /* DESCRIPTION: Gets the first item of data associated with the specified field of the specified data container. When the data come from a numeric input field in an option form, any expression entered by the user will be evaluated to determine a value for the number; the numeric value will be output in "Data->Num" and the expression will be output in "Data->Text". When the data come from a text input field, the raw text is output in "Data->Text" without replacing expressions. If you wish to support variable reference expressions such as "[$VAR]" where VAR is the name of a variable in the active target, the output string from this function can be given to the cvxPartVarSubstitute() function to replace the "[$VAR]" expressions with the values of the variables. For example: svxData Data; if (!cvxDataGet(idData, idField, &Data) && Data.isText) cvxPartVarSubstitute(Data.Text, sizeof(Data.Text), NULL); Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetAll ( int idData, /* I: id of data container (i.e. VDATA) */ int *numFld, /* O: number of fields in which valid data exists */ svxFldData **fldData /* O: list of field data */ ) /* DESCRIPTION: Gets data for all field in which valid data exists associated with the specified data container. If using cvxPartInqFtrData to get idData prior to calling this function, set cvxPartInqFtrData's iNoEval input argument to 0 to ensure idData will contain evaluated data. The calling procedure is responsible for deallocating the memory assigned by this function to the "fldData" structure using cvxFldDataFree(). Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetColor ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ svxColor *Color /* O: rgb color */ ) /* DESCRIPTION: Gets the RGB color values in the specified VDATA field as an integer or one index value. Use cvxDataSetColor() to encode RGB color as an integer or one index value into VDATA field. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetEnt ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int *idEntity, /* O: id of entity associated with field (0 if undefined) */ int *idParent /* O: id of entity parent (0 if undefined; NULL to ignore) */ ) /* DESCRIPTION: Gets the entity id associated with the specified field of the specified data container. Input NULL for "idParent" if you are not interested in getting parent information. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetEnts ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int *Count, /* O: data item count */ int **idEnts /* O: list of entity id's associated with field */ ) /* DESCRIPTION: Gets the list of entity id's associated with the specified field of the specified data container. The list referenced by "**idEnts" is allocated by this function and must be deallocated by the calling procedure. A NULL pointer is output if no data is found. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetItemData ( int Item, /* I: index of data item */ svxData *Data /* O: data of associated with specified data item */ ) /* DESCRIPTION: Get data of associated with specified data item. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetItemList ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int *Count, /* O: data item count */ int **idItems /* O: list of data item indices associated with field */ ) /* DESCRIPTION: Get a list of data item indices associated with the specified field of the specified data container. The list referenced by "**idItems" is allocated by this function and must be deallocated by the calling procedure. A NULL pointer is output if no data is found. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetList ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int *Count, /* O: data item count */ svxData **Data /* O: list of data items associated with "idField" */ ) /* DESCRIPTION: Gets the list of data items associated with the specified field of the specified data container. The list referenced by "**Data" is allocated by this function and must be deallocated by the calling procedure. A NULL pointer is output if no data is found. Note: for set list widget, idEntity to output the VDATA list associated with "idField" Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetMatrix ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ svxMatrix *Matrix /* O: transformation matrix */ ) /* DESCRIPTION: Get the transformation matrix associated with the specified field of the specified data container. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetNum ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ double *Number /* O: double precision number associated with "idField" */ ) /* DESCRIPTION: Gets the double precision number associated with the specified field of the specified data container. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetOpt ( int idData, /* I: id of data container (i.e. VDATA) */ int idField /* I: id of data field */ ) /* DESCRIPTION: Returns the integer option number associated with the specified field. */ ________________________________________________________________________________ int cvxDataGetPath ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int *FirstEnt, /* I: 1 for first entity; 0-subsequent entities */ svxEntPath *Ent /* O: entity pick path */ ) /* DESCRIPTION: Get the entity pick-path associated with "idField" of "idData". This function does not activate the pick-path. If "*FirstEnt=1", the first pick is retrieved, "*FirstEnt" is set to zero and static variables inside this function are set up to enable retrieval of the next pick when this function is called again with "*FirstEnt=0". If a pick is successfully retrieved, this function returns 0. If no pick was retrieved, it returns -1. If there was a fatal error, it returns 1. If "FirstEnt=NULL", the first entity is retrieved without setting things up to get a "next" entity. This function should not be called recursively, but no checking is done to insure it. Returns 0 if there is no error and an entity was retrieved successfully. Returns -1 if there is no error, but no entity was retrieved. Returns 1 if there is an error. */ ________________________________________________________________________________ int cvxDataGetPnt ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ svxPoint *Pnt /* O: point associated with field */ ) /* DESCRIPTION: Gets the point coordinates associated with the specified field of the specified data container. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetPnts ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int *Count, /* O: data item count */ svxPoint **Pnts /* O: list of points associated with field */ ) /* DESCRIPTION: Gets the list of point coordinates associated with the specified field of the specified data container. The list referenced by "**Pnts" is allocated by this function and must be deallocated by the calling procedure. A NULL pointer is output if no data is found. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetPromote ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int *Promote /* O: 1 to promote entity to parent, else 0 */ ) /* DESCRIPTION: Outputs "Promote=1", if the pick associated with the point-on-entity stored in the specified input field should be promoted to pick the parent of the entity instead of the entity itself. If not, "Promote=0" is output. A common case is the promotion of a curve pick to its parent sketch or curve list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGetText ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int NumBytes, /* I: number of bytes of memory referenced by "Text" */ char *Text /* O: null-terminated ascii string */ ) /* DESCRIPTION: Gets the null-terminated ascii text string associated with the specified field of the specified data container. If necessary, the string copied to the memory referenced by "Text" is truncated based on the value of "NumBytes". The calling procedure is responsible for allocating and deallocating the memory referenced by "Text". Note that this function outputs the raw text contained in the specified field. Expressions embedded in the text to reference ZW3D variables are not automatically replaced by the variable values. If you wish to support variable references of the form "[$VAR]" where VAR is the name of a variable in the active target, the output string from this function can be given to the cvxPartVarSubstitute() or cvxPartVarSubstituteResize() function to replace the "[$VAR]" expressions with the values of the variables. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataGrpRem ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int index /* I: index of data item */ ) /* DESCRIPTION: Remove the specified data item from specified field. Return 1 if error, else 0. */ ________________________________________________________________________________ int cvxDataInit ( const vxName Template, /* I: command template name */ int *idData /* O: id of data container */ ) /* DESCRIPTION: Creates and initializes a data container for the specified command. The calling procedure is responsible for deleting the container and its contents using cvxDataFree(). Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataInqActive ( int *idData /* O: id of data container */ ) /* DESCRIPTION: Get the index of the data container associated with the active form. If no form is activated, idData is set to -1. */ ________________________________________________________________________________ char* cvxDataName ( int idData /* I: id of data container (i.e. VDATA) */ ) /* DESCRIPTION: Gets form name by VDATA. RETURN: Form name. */ ________________________________________________________________________________ int cvxDataSet ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ svxData *Data /* I: data item */ ) /* DESCRIPTION: Assigns the specified item of data to the specified field of the specified data container. If "idField" is defined as a list in the command template used to initialize "idData", the new item of data is appended to items already associated with the field. If the field is not defined as a list, any existing item is replaced. Note: for set list widget, it could be set idEntity to input the command VDATA that could be created by cvxDataInit(). Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataSetColor ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ svxColor *Color /* I: rgb color */ ) /* DESCRIPTION: If the corresponding color widget's type is index color, find the color index by input "Color" rgb value. If the rgb value is not one of index color, it will return 1, otherwise set the index into specified VDATA field. If type is true color, encodes the input RGB color values as an integer stored in VDATA field. Use cvxDataGetColor() to retrieve RGB color from the field. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataSetMatrix ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ const svxMatrix* mat /* I: entity matrix */ ) /* DESCRIPTION: Logs a "mat" pick to the specified field of the specified data container. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataSetName ( int idData, /* I: id of data container (i.e. VDATA) */ const char* name /* I: template name */ ) /* DESCRIPTION: Set template name of VDATA. RETURN: 1 if error else 0. */ ________________________________________________________________________________ int cvxDataSetPath ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ svxEntPath *Ent /* I: entity pick path */ ) /* DESCRIPTION: Append the specified entity to the specified field of the specified data container. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataSetPntByPath ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ svxEntPath *entPath, /* I: the entity pick path */ svxPoint* pnt /* I: point on the entity */ ) /* DESCRIPTION: Add the specified point (pnt) as the Nth element (N = idField) of the specified data object (VDATA). If the Nth element is already defined (and it is a list), the point is appended to a list of points referenced by the Nth element. If the NTh element is defined (and it is not a list), the point is overwritten. Note: the id of path must start with -2 if you use "CdCnsCoin" command for a secondary development. Return 1 if error, else 0. */ ________________________________________________________________________________ int cvxDataSetPntOnCrv ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int idCrv, /* I: id of curve in active root object */ svxPoint *Pnt /* I: point on or near the curve or key point of curve (NULL to use the start point of the curve ) */ ) /* DESCRIPTION: Logs a "point on curve" pick to the specified field of the specified data container. Projects the specified point (Pnt) onto the specified curve. The point should lie on or near the curve. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataSetPntOnEnt ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ const svxPntOnEnt* pntData /* I: point on entity data */ ) /* DESCRIPTION: Log the point/direction on the entity or point/direction to the specified field. If you want to log the critical point to the field, you should set useCritPnt to 1 and set one type to critTyp. The point can be on the curve or the surface. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataSetPntOnFace ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int idComp, /* I: id of component in active part (0 to ignore) */ int idFace /* I: id of face in active part */ ) /* DESCRIPTION: Logs a "point on face" pick to the specified field of the specified data container. Uses a point on the specified face at the midpoint of the face's bounding box in UV parameter space. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataSetPntOnFace2 ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int idFace, /* I: id of face in active part */ svxPoint *Pnt /* I: point on or near the face */ ) /* DESCRIPTION: Logs a "point on face" pick to the specified field of the specified data container. Projects the specified point (Pnt) onto the face. The point should lie on or very near to the face in a location that can be projected onto the face along a face normal. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataSetPromote ( int idData, /* I: id of data container (i.e. VDATA) */ int idField, /* I: id of data field */ int Promote /* I: 1 to promote entity pick to parent, else 0 */ ) /* DESCRIPTION: If "Promote" is input as a non-zero value, the point-on-entity pick stored in the specified input field is flagged to tell ZW3D to promote the pick to the parent of the entity instead of the entity itself. If "Promote" is input as zero, the point-on-entity pick is flagged to tell ZW3D not to promote the pick to its parent. A common case is the promotion of a curve pick to its parent sketch or curve list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxDataToFeature ( int idData, /* I: id of data container (i.e. VDATA) */ int idFeature, /* I: id of feature in active part (0 for active feature operation) */ int ExcludeRegen /* I: 1 to disable the action of this function during regen, else 0 */ ) /* DESCRIPTION: When a feature is logged to the history, a copy of its driving VDATA is converted to a persistent state and recorded with the feature. After that, any modification you make to the original VDATA is not reflected into the VDATA recorded in the history. This function is used to update the VDATA associated with the specified feature (idFeature) with the contents of the input VDATA (idData). If "idFeature < 1", the VDATA of the feature created by the active feature operation (CustomOp) is updated. If "ExcludeRegen != 0", this function does nothing if it is called during history regeneration. Before the contents of "iData" are assigned to the specified feature, an attempt is made to make all entity picks/references in the "iData" persistent. This requires finding the specified entities in the active part in order to lookup their persistent labels. If the entities cannot be found in the current part state, this function will fail. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ void cvxDataZero ( svxData *Data /* I: pointer to data structure */ ) /* DESCRIPTION: Set all bytes of the input "Data" structure to zero. */ ________________________________________________________________________________