int cvxRootActivate
(
vxName Name      /* I: root object name */
)
/*
DESCRIPTION:
Activates the specified root object in the active file for editing. 
Returns 1 if function fails; 0 if it succeeds.
*/
________________________________________________________________________________

int cvxRootActivate2
(
vxName File,   /* I: root object file */
vxName Name      /* I: root object name */
)
/*
DESCRIPTION:
Activates the root object specified by "File" and "Root" as the
target object and backs up information about the current target 
object to an internal stack (up to 6 calls deep).  

When this function is called with "File=NULL" and "Root=NULL", 
the last target object on the stack is restored.  The calling 
application MUST reliably pair calls to this function to set 
and restore target objects.

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

int cvxRootAdd
(
evxRootType Type,         /* I: root object type */
vxName Name,             /* I: root object name */
vxName Template          /* I: optional template object name (or NULL) */
)
/*
DESCRIPTION:
Creates and inserts a root object of the specified type 
in the active file.   It becomes the active object for
editing.

An optional template object name may be input for a part,
sheet or plan.  If it is specified, the new root object 
is a copy of the template object.  It is assumed that 
the template object resides in the template file registered 
with cvxRootTemplateFile() before this function is called.

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

int cvxRootAdd2
(
evxRootType Type,         /* I: root object type */
vxName Name,             /* I: root object name */
vxName Template,         /* I: optional template object name (or NULL) */
char *Description         /* I: optional object description (or NULL) */
)
/*
DESCRIPTION:
This function is the same as cvxRootAdd(), but it also allows you
to assign a text string description to the new root object.  The 
description must not be longer than 96 bytes, including the null-
terminator.

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

int cvxRootCopy
(
vxName SourceFile,   /* I: name of file to copy from */
vxName SourceName,   /* I: name of root object in source file */
vxName DestFile,      /* I: name of file to copy to */
vxName DestName,      /* I: name to assign copied root object */
int Overwrite,         /* I: 0 = upgrade DestName to avoid naming conflict,
                     **      1 = prompt before overwriting existing object.
                     **     -1 = automatically overwrite existing object.
                     */
int UpdateUid         /* I: 1 to make UID's of copied geometry unique, else 0 */
)
/*
DESCRIPTION:
Copies the specified root object from "SourceFile" to "DestFile".
Both files must already exist and must reside in one of the 
directories specified in "vxpaths" (see cvxPathAdd() and
cvxPathSearchFirst()).

Normally, when a root object is copied, the unique id's in the copied
object are the same as the original object.  When "UpdateUid=1", the
the unique id's of the copied object are updated so they are different 
from the original object.  You should input "UpdateUid=0", unless you 
have a specific purpose for generating copies with different unique id's.
In normal usage, VX is able to differentiate entities in a copied object 
from the original object without changing unique id's.

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

int cvxRootDel
(
vxName Name      /* I: root object name */
)
/*
DESCRIPTION:
Deletes the specified root object from the active file.
Returns 1 if function fails; 0 if it succeeds.
*/
________________________________________________________________________________

void cvxRootExit (void)
/*
DESCRIPTION:
Exits the active root object to either the parent object
or the parent file.
*/
________________________________________________________________________________

int cvxRootId
(
vxName Name,            /* I: root object name */
int *idRoot,            /* O: root object id */
evxRootType *Type         /* O: root object type */
)
/*
DESCRIPTION:
Gets the database id of the specified root object (Name) in
the active file.  "idRoot = 0" is output if root object is
not found.

Returns 0 if root object is found; 1 if not found.
*/
________________________________________________________________________________

void cvxRootInqActive
(
vxName Name      /* O: name of active root object */
)
/*
DESCRIPTION:
Outputs the name of the active root object.
Outputs "Name[0]=0" if there is not an active root object.
*/
________________________________________________________________________________

int cvxRootList
(
vxPath File,   /* I: optional VX file path (pass in NULL if undefined) */
int *Count,      /* O: no. of root objects output via "Names" */
vxName **Names /* O: list of root object names */
)
/*
DESCRIPTION:
if "File" is input as NULL, this function gets a list of the names of all 
the root objects in the active file.

If the path of a valid VX file is input via "File", this function gets a 
list of the root objects in the specified file.

The list referenced by "**Names" 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.
*/
________________________________________________________________________________

evxPreviewMode cvxRootPreviewGet(void)
/*
DESCRIPTION:
Returns 1 if a graphical root object preview is enabled.
Otherwise, returns 0.
*/
________________________________________________________________________________

void cvxRootPreviewSet
(
evxPreviewMode Mode,      /* I: preview mode */
vxName File,            /* I: file (NULL if VX_PREVIEW_OFF) */
vxName Object            /* I: object (NULL if VX_PREVIEW_OFF) */
)
/*
DESCRIPTION:
Displays the specified preview for the specified root object.
*/
________________________________________________________________________________

int cvxRootRename
(
vxName Name,      /* I: name of root object to rename (in active file) */
vxName NewName,    /* I: new name for root object */
int Update         /* I: 1 to update references by name, else 0 */
)
/*
DESCRIPTION:
Renames a root object in the active file.  If "Update" is input 
as a non-zero value, references to "Name" in the active file are 
changed to "NewName".

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

int cvxRootRename2
(
vxName Name,      /* I: name of root object to rename (in active file) */
vxName NewName,    /* I: new name for root object */
char *Descript,   /* I: new description for root object (NULL if undefined) */
int Update         /* I: 1 to update references by name, else 0 */
)
/*
DESCRIPTION:
Renames a root object in the active file and assigns the specified
description to it (if defined).  If "Update" is input as a non-zero 
value, references to "Name" in the active file are changed to "NewName".
Passing in a blank string for "Descript" will clear the current
description associated with the specified root object.

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

void cvxRootTemplateFile
(
vxName File  /* I: template object file name (NULL for default name) */
)
/*
DESCRIPTION:
Registers the specified object file name as the file from 
which cvxRootIns() retrieves template objects.  The file
should reside in one of the active search directories
(see cvxPathAdd()).  Input NULL or a blank string to
use the default template file name (defined in config).
*/
________________________________________________________________________________

int cvxRootVarGet
(
vxName Name,            /* I: root object name */
svxVariable   *Variable   /* I/O: variable data */
)
/*
DESCRIPTION:
Searches the specified root object in the active file
for the variable named "Variable->Name".

The value of the specified variable is output via 
"Variable->Value" in database units (mm, deg).
The "isDistance" parameter is not set by this function.

If "Variable->Name" is a string variable, the associated 
text is output via "Variable->Expression".  Strings longer 
than 256 bytes are truncated.  

NOTE that "Variable->Expression" is not used to output the 
expression that defines a variable.  It is used to output 
text associated with a "string" variable.

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

int cvxRootVarSet
(
vxName Name,            /* I: root object name */
int Count,               /* I; number of variables */
svxVariable *Variables,   /* I: list of variables */
int Working                /* I: 1 to display "Working..." message, else 0 */
)
/*
DESCRIPTION:
Updates the variables (e.g. dimensions, parameters) specified 
by "Variables" in the specified root object within the active
file.  The root object is then regenerated.

You can disable the object regeneration normally performed by
this function by inputing "Working = -1".

A field of a history operation's input data is identified by a
variable name encoded as follows (brackets included):

      

Part attributes may be modified using the following variable names,
with the new attribute value or data assigned to the "Expression" field
of the "svxVariable" data structure.

      part_number, part_class, part_designer, part_cost, part_supplier
      part_description, part_keyword, part_manager, part_material

User-defined data stored in a part's attributes can be modified
using a variable name composed from "part_" and a user-data label.
For example, if an item of user data were labeled "my_data", the
corresponding variable name would be "part_my_data".  The new user
data would be defined via the "Expression" field of the "svxVariable"
data structure.

The part "density" attribute is modified via the variable name "part_density".
The new density (kg/mm3) is defined via the "Value" field of the "svxVariable"
data structure.

The color of all faces in a part may be modified via the "part_color"
variable with "Expression" set to "Aluminum", "Brass", "Bronze", "Copper",
"Silver", "Steel", "Stainless", "Gold", "Gray", "Red", "Green", "Blue",
"Brown", "Orange" or RGB values (0-255) encoded as "R.G.B" (e.g. 136.255.0).

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

void cvxRootVisibility
(
vxName Name,      /* I: root object name */
int Visible         /* I: 1 to show; 0 to hide */
)
/*
DESCRIPTION:
If "Visible = 0", suppress display of the specified 
root object in the root object browser.

If "Visible = 1", enable display of the specified
root object in the root object browser.

If is assumed "Name" identifies a valid root object
in the active file.
*/
________________________________________________________________________________