CAM Library
API Reference
Set Functions

Available Set Functions used by CAM Library. More...

Functions

int camlib_SetLayer (int nLayer)
 Sets the Layer Number for the active figure. More...
 
int camlib_SetPurpose (int nPurpose)
 Sets the Purpose Number for the active figure. More...
 
int camlib_SetCompositeLevel (int nCompositeLevel)
 Assign the Composite Level for the active figure. For more information about composites view Composite 101. More...
 
int camlib_SetNet (char *net)
 Sets the Net for the active figure. Net names are case sensative. More...
 
int camlib_SetPathWidth (float fWidth)
 Sets the Path Width for the active figure. More...
 
int camlib_SetPathType (int nPathType)
 Sets the Path Type for the active figure. More...
 
int camlib_SetTextString (char *textvalue)
 Sets the Text string for the current Text figure.
More...
 
int camlib_SetTextStyle (char *textstyle)
 Sets the Text string for the current Text figure. More...
 
int camlib_SetTextHeight (float height)
 Sets the Text height for the current Text figure. More...
 
int camlib_SetTextAngle (float angle)
 Sets the Text angle for the current Text figure. More...
 
int camlib_SetTextMirror (int mirror)
 Sets horizontal or vertical Mirror for the current Text figure. More...
 
int camlib_SetTextAlign (char *align)
 Sets the Text alignment for the current Text figure. More...
 
int camlib_SetInsertName (char *insertname)
 Sets the master cell name for the current Insert figure. More...
 
int camlib_SetInsertAngle (float angle)
 Sets the angle for the current Insert figure. More...
 
int camlib_SetInsertMirror (int mirror)
 Sets the angle for the current Insert figure. More...
 
int camlib_SetInsertStepRepeat (int rows, int cols, float rowdist, float coldist)
 Sets the Arrayed parameters the current Insert figure. The resulting Insert will be an Arrayed Insert, which can drastically reduce design data size. More...
 
int camlib_SetPointArray (int n, float x, float y)
 Edit the point array for the active figure.
More...
 
int camlib_SetPoint (float x, float y)
 Edit the point for the active figure. More...
 
int camlib_SetDcode (int nDcode)
 Assign Dcode for the active figure.
More...
 
int camlib_SetNcToolNumber (int nTool)
 Assign the NC Tool number for the active figure. More...
 
int camlib_SetNcToolType (int nToolType)
 Assign the NC Tool Type for the active figure. To view available NC Tool number values, see CAM_NCToolType. More...
 
int camlib_SetNcToolCompensation (int nToolCompensation)
 Assign the NC Tool compensation for the active figure. To view available NC Tool compensation values, see CAM_CompensationSideType. More...
 
int camlib_SetActiveFigure (int n)
 Sets the current figure from the active cell.
More...
 

Detailed Description

Available Set Functions used by CAM Library.

Function Documentation

◆ camlib_SetActiveFigure()

int camlib_SetActiveFigure ( int  n)

Sets the current figure from the active cell.

Note
After using camlib_ActivateCellFlattenHierarchy or camlib_ActivateCell an array of figures is generated for the active cell.
Parameters
nPosition in figure array to make active.
Returns
Returns 0 if successful, else -1.

◆ camlib_SetCompositeLevel()

int camlib_SetCompositeLevel ( int  nCompositeLevel)

Assign the Composite Level for the active figure. For more information about composites view Composite 101.

Parameters
nCompositeLevelComposite Level number to assign.
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetDcode()

int camlib_SetDcode ( int  nDcode)

Assign Dcode for the active figure.

Parameters
nDcodeDcode number to assign to the active figure. Must be between 10 to 10000.
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetInsertAngle()

int camlib_SetInsertAngle ( float  angle)

Sets the angle for the current Insert figure.

Note
active figure must be an Insert. To determine the active figure type use camlib_GetFigureType
Parameters
angleAngle to assign for the current Insert.
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetInsertMirror()

int camlib_SetInsertMirror ( int  mirror)

Sets the angle for the current Insert figure.

Note
active figure must be an Insert. To determine the active figure type use camlib_GetFigureType
Parameters
mirrorAssign horizontal or vertical Mirror for the current Insert figure.
  • 1 = Horizontal Mirror (about Y Axis)
  • 2 = Vertical Mirror (about X Axis)
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetInsertName()

int camlib_SetInsertName ( char *  insertname)

Sets the master cell name for the current Insert figure.

Note
active figure must be an Insert. To determine the active figure type use camlib_GetFigureType
Parameters
insertnameCell name to assign for the current Insert.
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetInsertStepRepeat()

int camlib_SetInsertStepRepeat ( int  rows,
int  cols,
float  rowdist,
float  coldist 
)

Sets the Arrayed parameters the current Insert figure. The resulting Insert will be an Arrayed Insert, which can drastically reduce design data size.

Note
active figure must be an Insert. To determine the active figure type use camlib_GetFigureType
Parameters
rowsNumbers of Rows used for Array.
colsNumbers of Columns used for Array.
rowdistDistance between Rows (in millimeters).
coldistDistance between Columns (in millimeters).
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetLayer()

int camlib_SetLayer ( int  nLayer)

Sets the Layer Number for the active figure.

Parameters
nLayerLayer number to assign.
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetNcToolCompensation()

int camlib_SetNcToolCompensation ( int  nToolCompensation)

Assign the NC Tool compensation for the active figure. To view available NC Tool compensation values, see CAM_CompensationSideType.

Parameters
nToolCompensationNC Tool compensation to assign to the active figure. To view available NC Tool compensation values, see CAM_CompensationSideType
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetNcToolNumber()

int camlib_SetNcToolNumber ( int  nTool)

Assign the NC Tool number for the active figure.

Parameters
nToolNC Tool number to assign to the active figure. Must be 1 to 1000.
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetNcToolType()

int camlib_SetNcToolType ( int  nToolType)

Assign the NC Tool Type for the active figure. To view available NC Tool number values, see CAM_NCToolType.

Parameters
nToolTypeNC Tool Type to assign to the active figure. To view available NC Tool number values, see CAM_NCToolType
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetNet()

int camlib_SetNet ( char *  net)

Sets the Net for the active figure. Net names are case sensative.

Parameters
netNet name to assign to active figure.
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetPathType()

int camlib_SetPathType ( int  nPathType)

Sets the Path Type for the active figure.

Note
active figure must be a Path. To determine the active figure type use camlib_GetFigureType
Parameters
nPathTypePath type to assign to path (i.e active figure). See more information about available Path Types values CAM_PathType
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetPathWidth()

int camlib_SetPathWidth ( float  fWidth)

Sets the Path Width for the active figure.

Note
active figure must be a Path. To determine the active figure type use camlib_GetFigureType
Parameters
fWidthWidth to assign to path (i.e active figure). Value in millimeters.
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetPoint()

int camlib_SetPoint ( float  x,
float  y 
)

Edit the point for the active figure.

Note
Figure type must be Text, Flash, or Insert; if not, nothing will be done. For more information about Figure types, see CAM_FigureType
Parameters
xAssign Point (X value in millimeters).
yAssign Point (X value in millimeters).
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetPointArray()

int camlib_SetPointArray ( int  n,
float  x,
float  y 
)

Edit the point array for the active figure.

Note
Figure type must be a Polygon, Path, or Line; if not, nothing will be done. For more information about Figure types, see CAM_FigureType
Parameters
nVertex to edit.
xAssign Point (X value in millimeters).
yAssign Point (X value in millimeters).
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetPurpose()

int camlib_SetPurpose ( int  nPurpose)

Sets the Purpose Number for the active figure.

Parameters
nPurposePurpose number to assign.
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetTextAlign()

int camlib_SetTextAlign ( char *  align)

Sets the Text alignment for the current Text figure.

Note
active figure must be Text. To determine the active figure type use camlib_GetFigureType
Parameters
alignAssign the alignment for the current Text figure.
  • "upperleft" = Upper Left Alignment
  • "centerleft" = Center Left Alignment
  • "lowerleft" = Lower Left Alignment
  • "uppercenter" = Upper Center Alignment
  • "centercenter" = Center Center Alignment
  • "lowercenter" = Lower Center Alignment
  • "upperright" = Upper Right Alignment
  • "centerright" = Center Right Alignment
  • "lowerright" = Lower Right Alignment
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetTextAngle()

int camlib_SetTextAngle ( float  angle)

Sets the Text angle for the current Text figure.

Note
active figure must be Text. To determine the active figure type use camlib_GetFigureType
Parameters
angleAssign Angle for the current Text figure.
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetTextHeight()

int camlib_SetTextHeight ( float  height)

Sets the Text height for the current Text figure.

Note
active figure must be Text. To determine the active figure type use camlib_GetFigureType
Parameters
heightAssign height for the current Text figure (in millimeters).
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetTextMirror()

int camlib_SetTextMirror ( int  mirror)

Sets horizontal or vertical Mirror for the current Text figure.

Note
active figure must be Text. To determine the active figure type use camlib_GetFigureType
Parameters
mirrorAssign horizontal or vertical Mirror for the current Text figure.
  • 1 = Horizontal Mirror (about Y Axis)
  • 2 = Vertical Mirror (about X Axis)
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetTextString()

int camlib_SetTextString ( char *  textvalue)

Sets the Text string for the current Text figure.

Note
active figure must be Text. To determine the active figure type use camlib_GetFigureType
Parameters
textvalueAssign new string to the Text figure.
Returns
Returns 0 if successful, else -1.
See also
camlib_SetActiveFigure

◆ camlib_SetTextStyle()

int camlib_SetTextStyle ( char *  textstyle)

Sets the Text string for the current Text figure.

Note
active figure must be Text. To retrieve the active figure type use camlib_GetFigureType
Parameters
textstyleText style to assign to path (i.e active figure). The font name can be one of the available font files located in the CAM Library folder ../fonts Make sure to removee the .fnt extesion.
Returns
Returns 0 if successful, else -1.
Note
Font files (*.fnt) are derived from any TrueType or AutoCAD SHX font file. If CAM Library does not have a particular font you wish to use, you can create the font file using ACE 3000 or FAB 3000.
See also
https://support.numericalinnovations.com/support/discussions/topics/14000003029
camlib_SetActiveFigure