Notes Operations
xSetNotesFont
Sets notes font info.
bool xSetNotesFont(String sFontName, short iFontSize, short iR, short iG, short iB)
return
Returns True, if successful.
sFontName
Notes font name.
iFontSize
Notes font size. The valid range is 8 to 72.
iR, iG, iB
RGB color values of the text color. The valid range is 0 to 255.
xSetLabelAutoArrangeMode
Arranges probe labels in a ordered manner.
void xSetLabelAutoArrangeMode(int iMode)
return
None.
iMode
Sets label arrangement mode. The valid range is 0 to 5.
0 – Actual
1 – Top-Bottom
2 – Compact
3 – Circular
4 – Silhouette
5 – Rectangular
xAdd2DNotes
Adds a note in 2D space.
bool xAdd2DNotes(String sNotes, float fX, float fY, bool bRelativePosition)
return
Returns True, if successful.
sNotes
Notes that to be added as a label. To set multiline notes use line separator as \n.
fX, fY
Screen X and Y position.
bRelativePosition
If True, fX and fY are considered as a relative position to the
screen. Else, they are considered as actual screen position.
xShowAllLabels
Shows all labels available/created.
void xShowAllLabels()
return
None.
xSetNotesBackground
Sets user notes background color.
bool xSetNotesBackground(bool bBackground, short iR, short iG, short iB)
return
Returns
True, if successful.
bBackground
If set to
True, displays label with the background color.
iR, iG, iB
RGB color value. Range 0.0-1.0 and 0-255.
xSetNotesBorder
Sets notes border color.
bool xSetNotesBorder(bool bBorder, short iR, short iG, short iB)
return
Returns
True, if successful.
bBorder
If set to
True, displays label with the border color.
iR, iG, iB
Sets RGB color for label border. Range0.0 to 1.0 and 0 to 255.
xGetUser2DLabelCount
Get 2D annotation label count in the current view.
int xGetUser2DLabelCount()
return
Returns 2D annotations array size.
xGetUser2DLabelText
Gets 2D label text content.
String xGetUser2DLabelText(int iIndex)
return
Returns table’s text.
iIndex
Index of the labels. Valid range 0 to
xGetUser2DLabelCount return value -1.
xDeleteUser2DLabel
Deletes 2D annotation label by its index.
bool xDeleteUser2DLabel(int iIndex)
return
Returns True, if successful.
iIndex
3D label’s ID that to be deleted.
xDeleteAllUser2DLabels
Deletes all 2D annotations.
bool xDeleteAllUser2DLabels()
return
Returns True, if successful.
xGetUser3DLabelCount
Gets 3D annotation label array size (annotation that is attached to part).
int xGetUser3DLabelCount()
return
Returns count of 3D annotation labels.
xGetUser3DLabelText
Gets text set in the label for given index.
String xGetUser3DLabelText(int iIndex)
return
Label Text content.
iIndex
Index of the label in 3D label array. 0 based index.
xDeleteUser3DLabel
Deletes 3D annotation label by given index.
bool xDeleteUser3DLabel(int iIndex)
return
Returns True, if successful.
iIndex
Index of the label in 3D label array. 0 based index.
xDeleteAllUser3DLabels
Deletes all 3D annotation labels (Annotations that are attached to parts).
bool xDeleteAllUser3DLabels()
return
Returns True, if successful.
xHideAllLabels
Hides all labels.
void xHideAllLabels()
return
None.
xSetUser2DLabelText
Sets/Modifies text to 2D user label. (Unattached label).
bool xSetUser2DLabelText(int iIndex, List<String> TextArray)
return
Returns True, if successful.
iIndex
Index of the 2D label in 2D label array.
TextArray
Text value in a array. Each array entry represents a new line.
pxGetUser2DLabelText
Gets 2D user label text.
List<String> pxGetUser2DLabelText(int iIndex)
return
Returns set text entries in an array. Each array entry represents a line.
iIndex
Index of the 2D label in 2D label array.
xSetUser3DLabelText
Sets/Modifies text to 3D user label.(Attached to a part’s vertex).
bool xSetUser3DLabelText(int iIndex, List<String> TextArray)
return
Returns True, if successful.
iIndex
Index of the 3D label in 3D label array.
TextArray
Text value in a array. Each array entry represents a new line.
pxGetUser3DLabelText
Gets 2D user label text.
List<String> pxGetUser3DLabelText(int iIndex)
return
Returns set text entries in an array. Each array entry represents a line.
iIndex
Index of the 3D label in 3D label array.
#3DNoteTable
xAdd3DNotesByID
Creates user defined annotation label that is attached to a Node ID.
bool xAdd3DNotesByID(String sModel, String sPart, int iNodeID, List<String> sTextArray)
return
Returns True, if successful.
sModel
Model name for the probe table to be associated.
sPart
Part name where thee nodeID belongs to.
iNodeID
Node ID for the 3D annotaion label to be created.
sTextArray
New user text array. Each array entry will be added as new line in the label.
xAdd3DNotesByPos
Creates user defiled annotation label that is attached to a point/vertex.
bool xAdd3DNotesByPos(String sModel, String sPart, float x, float y, float z,
List<String> sTextArray, bool bSnapVertex)
sModel
Model name for the ProbeTable to be associated.
sPart
Part name where the vertex belongs to.
x, y, z
Point/Vertex values in cartesian coordinates.
sTextArray
New user text array. Each array entry will be added as a user text label field.
bSnapVertex
If True, the label will be attached to its nearest vetrex (node).
Otherwise it will attached to the exact position given.
pxGet2DNoteIDs
Gets all 2D note IDs(2D label).
List<size_t> pxGet2DNoteIDs()
return
Returns 2D note IDs(2D label IDs) in an array.
xSet2DNotesText
Modifies text info of a 2D label (Single line).
bool xSet2DNotesText(size_t iLabelID, String sNotes)
return
Returns True, if successful.
iLabelID
2D label ID.
sNotes
New text value to be set.
xGet2DNotesText
Gets 2D label’s text value (single line).
String xGet2DNotesText(size_t iLabelID)
return
Returns 2D label text.
iLabelID
2D Label ID.
xSet2DNotesTextEx
Modifies text info of a 2D label (Multiple lines).
bool xSet2DNotesTextEx(size_t iLabelID, List<String> sNotes)
return
Returns True, if successful.
iLabelID
2D Label ID.
sNotes
Multi line note values in an array.
pxGet2DNotesTextEx
Gets 2D label’s text value. (Multiple lines)
List<String> pxGet2DNotesTextEx(size_t iLabelID)
return
Returns each line values in an array.
iLabelID
2D Label ID.
xSet2DNotesPosition
Modifies 2D label’s screen position.
bool xSet2DNotesPosition(size_t iLabelID, float fX, float fY, bool bRelativePosition)
return
Returns True, if successful.
iLabelID
2D label ID.
fX ,fY
2D label’s Left bottom Screen x,y coordinates. If bRelativePosition is
True, this fx and fy range should be 0 to 1. Else absulte screen
position in pixels.
bRelativePosition
If it is set to True, label will be moved/repositioned along with
the screen when resized. If set to False, it will be positioned in
absolute pixel position of viewer window size.
pxGet2DNotesPosition
Get 2D labels current position.
List<float> pxGet2DNotesPosition(size_t iLabelID)
return
Returns an array size of 3, if it is set as Relative postion 2D label.
First 2 vaue are X, Y values. Third is releative Position value 0 or
1.
Returns an array size of 2, if it is set as absolute postion 2D label.
Returned 2 values are X, Y values in pixel.
iLabelID
2D label ID.
xSetNotesFontName
Set 2D label’s font.
bool xSetNotesFontName(size_t iLabelID, String sFontName)
return
Returns True, if successful.
iLabelID
ID of the 2D label. If NULL sets as default.
sFontName
New Font Name.
xGetNotesFontName
Gets 2D label’s font.
String xGetNotesFontName(size_t iLabelID)
return
Returns font’s name.
iLabelID
ID of the 2D label.If NULL gets default.
xSetNotesFontSize
Sets 2D labels text size.
bool xSetNotesFontSize(size_t iLabelID, int iFontSize)
return
Returns True, if successful.
iLabelID
ID of the 2D label.If NULL sets as default.
iFontSize
Text size in pixels.
xGetNotesFontSize
Gets 2D label’s text size.
int xGetNotesFontSize(size_t iLabelID)
return
Returns 2D label’s text size in pixels.
iLabelID
ID of the 2D label.If NULL gets default.
xSetNotesFontColor
Sets 2D label’s text color.
bool xSetNotesFontColor(size_t iLabelID, int iR, int iG, int iB)
return
Returns True, if successful.
iLabelID
ID of the 2D label.
iR, iG, iB
Red,Green and Blue component values of the text color in range of 0.0 - 1.0 and 0 - 255.
pxGetNotesFontColor
Gets text color.
List<int> pxGetNotesFontColor(size_t iLabelID)
return
Returns text color info in an array of size 3.
retArray[0] = iR (Red color component of text color)
retArray[1] = iG (Green color component of text color)
retArray[2] = iB (Blue color component of text color)
iLabelID
ID of the 2D label.If NULL get default.
xSetNotesBackgroundInfo
Sets 2D label’s background attribute.
bool xSetNotesBackgroundInfo(size_t iLabelID, bool bBackground, int iR, int iG, int iB)
return
Returns True, if successful.
iLabelID
ID of the 2D label.If NULL sets as default.
bBackground
Set True to show background rectangle.
iR, iG, iB
Red,Green and Blue components of background color. (Range 0.0 to 1.0 and 0-255)
pxGetNotesBackgroundInfo
Gets 2D label’s background info.
List<int> pxGetNotesBackgroundInfo(size_t iLabelID)
return
Returns backgroud info in an array of size 4.
retArray[0] = iR (Red color component of background color)
retArray[1] = iG (Green color component of background color)
retArray[2] = iB (Blue color component of background color)
retArray[3] = `True` or `False` flag of background visiblity
iLabelID
ID of the 2D label.If NULL gets default.
xSetNotesBorderInfo
Sets 2D label’s border attributes.
bool xSetNotesBorderInfo(size_t iLabelID, bool bBorder, int iR, int iG, int iB)
return
Returns True, if successful.
iLabelID
ID of the 2D label.If NULL sets as default.
bBorder
Set True to show border line.
iR, iG, iB
Red,Green and Blue components of border color. (Range 0.0 to 1.0 and 0-255).
pxGetNotesBorderInfo
Gets 2D label’s border info.
List<int> pxGetNotesBorderInfo(size_t iLabelID)
return
Returns border info in an array of size 4.
retArray[0] = iR (Red color component of border color)
retArray[1] = iG (Green color component of border color)
retArray[2] = iB (Blue color component of border color)
retArray[3] = `True` or `False` flag of border visiblity
iLabelID
ID of the 2D label.If NULL gets default.
pxGetNotesDimension
Gets width and height of given label either as absolute values or as normalized values based on an input flag.
List <float> pxGetNotesDimension(size_t iLabelID, bool bNormalized)
return
Returns real values in an array of size 2.
retArray[0] = width
retArray[1] = height
iLabelID
Input Label ID
bNormalized
If True, function returns normalized width and height (i.e. values
between 0 and 1).
If False, function returns absolute width and height of given label.
xAdd3DNotesByGlobalPos
Creates user defiled annotation label that is attached to a point/vertex in global corrdinate system.
size_t xAdd3DNotesByGlobalPos(String sModel, String sPart, float x, float y, float z, List<String> sTextArray,bool bSnapVertex)
return
Returns ID of the label. 0 when failed. This IDs lifetime is very short. It will become invalid once another label is added. It is suggested to set a key to the ID using xSet2DLabelKey for future access of this label.
sModel
Model name for the ProbeTable to be associated.
sPart
Part name where the vertex belongs to.
x y z
Point/Vertex values in global cartesian coordinates.
sTextArray
New user text array. Each array entry will be added as a user text label field.
bSnapVertex
If true, the label will be attached to its nearest vetrex (node). Otherwise it will attached to the exact position given.
pxGet3DNoteIDs
Gets all 3D note IDs( geometry attached user labels) for a model.
List<size_t> pxGet3DNoteIDs(String sModel )
return
Returns 3D note IDs( geometry attached user labels) in an array. sModel
Model name. If model name is an empty string it gets all 3D notes in the scene.
xSet3DNotesText
Sets text to user note that is attached to a part based on its ID.
bool xSet3DNotesText(size_t iLabelID, String sNotes)
return
Returns True if successful.
iLabelID
Valid 3D Label ID.
sNotes Text to display in the label.
xGet3DNotesText
Gets text of a user note’s label based on it ID.
String xGet3DNotesText(size_t iLabelID)
return
Returns text set in the label. Empty string if it is an invalid id.
iLabelID
Valid 3D Label ID
xSet3DNotesTextEx
Sets text to user note’s lable in an array that is attached to a part based on its ID.
bool xSet3DNotesTextEx(size_t iLabelID, List<String> sNotes)
return
Returns True if successful.
iLabelID
Valid 3D Label ID
sNotes
Content to set in an array. Each index of the array denotes a new line.
pxGet3DNotesTextEx
Gets text of user notes based on ID.
List<String> pxGet3DNotesTextEx(size_t iLabelID)
Return
Returns text set in the label. Empty array if it is an invalid id.
iLabelID
Valid 3D Label ID
xIsValid2DLabelID
Validates a 2D label ID
bool xIsValid2DLabelID(size_t iLabelID)
return
Returns True if it’s a valid 2D note’s label ID.
iLabelID
Label ID to validate.
xIsValid3DLabelID
Validates a 3D label ID
bool xIsValid3DLabelID(size_t iLabelID)
return
Returns True if it’s a valid 3D note’s label ID
iLabelID
Label ID to validate.
xSetAnnotationAttributes
Sets Annotation attributes like the label is,
To be attached to geometry or not
Position is relative to viewport or not.
bool xSetAnnotationAttributes(List < String > userText, bool bAttachGeometry, bool bRelativePosition)
return
Returns True if it succeeds.Returns False otherwise.
userText
Text content of the label.
bAttachGeometry
Set True to attach to a part, False to set as a 2D label, that is not attached to a part.
bRelativePosition
Set True, for relative position to screen. False to set absolute position.
xDeleteLabel
Deletes a label based on its ID.
int xDeleteLabel(size_t iLabelID,int iType=-1)
return
If iType isr 0 to 5 it returns label index..
If iType is set as -1 then Returns the type of the label is associated.
Returns negative number if failed. -1 for invalid ID and -2 for ID is not found in specified type.
iLabelID
Label ID.
iType
Valid values are -1, 0,1,2,3,4 and 5
case 1: 2D label
case 2: 3D label
case 3: 2D image Label
case 4: 3D Image label
case 5: 2D rich text label- for future use
case 6: 3D rich text label -for future use.
case -1:From All above type
xGet2DLabelIndex
Gets 2D labels’s index based on its ID.
int xGet2DLabelIndex(size_t iLabelID)
return
Returns index of the Label ID
iLabelID
Label ID
xDeleteUserLabelIDs
Deletes user labels using an id list.
int xDeleteUserLabelIDs(std::vector<size_t> idlist)
return
Returns count of deleted user labels.
Idlist
ID list of user labels. IDs can be from 2D and 3D notes,2D Tables, 2D and 3D Image labels.