Edit Operations
xSetPlainBackground
Sets background mode to a plain background.
bool xSetPlainBackground(short iRed, short iGreen, short iBlue, bool bUpdateAllViewPoints)
return
Returns True, if successful.
iRed, iGreen, iBlue
RGB color fields. Range 0 to 255.
bUpdateAllViewPoints
If True, updates all the available viewpoints with this background.
xSetGradientBackground
Sets background mode to gradient background
bool xSetGradientBackground(short iRed1, short iGreen1, short iBlue1, short iRed2, short iGreen2, short iBlue2, bool bUpdateAllViewPoints)
return
Returns True, if successful.
iRed1, iGreen1, iBlue1
RGB color fields of color 1. Range 0 to 255.
iRed2, iGreen2, iBlue2
RGB color fields of color 2. Range 0 to 255.
bUpdateAllViewPoints
If True, updates all the available viewpoints with this background.
xSetImage
Sets background mode to image mode.
bool xSetImage(String sImageFilePath, short iTextureMode, bool bUpdateAllViewPoints)
return
Returns True, if successful.
sImageFilePath
Image file full path.
iTextureMode
Sets Texture mode. Range 0 to 2; 0 for Center, 1 for Stretch, 2 for Tile.
bUpdateAllViewPoints
If True, updates all the available viewpoints with this background.
xShowAll
Displays all the parts of the model.
bool xShowAll(String sModel)
return
Returns True, if successful.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
xInvertShow
Inverse visibility state of the parts of the model.
bool xInvertShow(String sModel)
return
Returns True, if successful.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
xHideOthers
Hides unselected parts.
bool xHideOthers(const String sModel, const String sSelectedPartsList)
return
Returns True, if successful.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sSelectedPartsList
Reserved for future use. Can be ignored now by passing an empty String.
Note: In this version, before using this method it is required to select parts.
To Select parts/assembly
`xSelectNodeEx <./Parts%20Operations.md#xselectnodeex>`__ or
`xSelectNode <./Parts%20Operations.md#xselectnode>`__ can be used.
xSetDisplayMode
Sets display mode for all parts in the scene.
void xSetDisplayMode(short iDisplayMode)
return
None.
iDisplayMode
Sets display mode of the scene. Valid range 0 to 5.
0 – Shaded
1 – Shaded Mesh
2 – WireFrame
3 – HiddenLine Removal
4 – Point
5 – Transparent
xDeselectAll
Removes all the parts from the selection list.
bool xDeselectAll(const String sModel)
return
Returns True, if successful.
sModel
Reserved for future use. Can be ignored now by passing an empty string.
xDeleteAllVisible
Deletes all the parts that are visible.
bool xDeleteAllVisible(String sModel)
return
Returns True, if successful.
sModel
Reserved for future use. Can be ignored now by passing an empty string.
xDeleteAllLabels
Deletes all labels.
void xDeleteAllLabels()
return
None.
xExplode
Sets parts in exploded view.
In GUI
void xExplode(bool bExplode, ushort iPercent, bool bAnimate, short iExplodeType)
bExplode
Set True to explode. False to reset explode.
iPercent
The percentage value of current explode; It should be positive and less than or equal to 100.
bAnimate
Sets animation flag. If True it will do animation while exploding.
iExplodeType
Reserved for future use. Now pass value 1.
xSetExplodePosition
Sets exploded position, normalized in (0,100). 0 is mapped to the initial position and 100 is final exploded position. Any value inside this range is interpolated.
bool xSetExplodePosition(short iPos)
return
Returns True if successful.
iPos
Normalized exploded position.
xGetExplodePosition
Gets current exploded position, normalized in (0,100). 0 is mapped to the initial position and 100 is final exploded position. Any value inside this range is interpolated.
short xGetExplodePosition()
return
Returns normalized exploded position between 0 and 100.
xSetBackgroundMode
Changes background mode.
bool xSetBackgroundMode(int iMode)
return
Returns True, if successful.
iMode
Valid Range 0 to 2.
0 - Plain
1 - Gradient
2 - Texture
pxGetShadedMeshColor
Gets shaded mesh line color.
List<float> pxGetShadedMeshColor()
return
Returns r, g, b values in an array of size 3.
retArray[0] = r
retArray[1] = g
retArray[2] = b
xSetShadedMeshColor
Sets Shadedmesh line color.
bool xSetShadedMeshColor(float r, float g, float b)
return
Returns True, if successful.
r, g, b
RGB color value. Valid range 0-255.
xSetShadedMeshColorMode
Sets Shaded mesh Mode using user color or palette color.
Note: Palette Color is applicable for CAE Models.
void xSetShadedMeshColorMode(int iMode)
return
None.
iMode
0 - UserColor
1 - PaletteColor
xGetShadedMeshColorMode
Gets applied ShadedMesh color mode.
int xGetShadedMeshColorMode()
return
Returns currently set color mode for ShadedMesh.
0 - UserColor
1 - PaletteColor
xSetDisplayModeTransparency
Sets transparency percentage value for ‘Transparent’ ‘DisplayMode’.
bool xSetDisplayModeTransparency(int iPercent)
return
Returns False, if failed.
Returns True, if succeed.
iPercent
Percentage Value of Transparency in the range of (0,100). The default
value is 93%.
100% refers to Full Transparency. i.e, the model becomes invisible.
0% refers to No Transparency.
xGetDisplayModeTransparency
Gets transparency percent value of Display Mode.
int xGetDisplayModeTransparency()
return
Returns -1, if failed.
Returns percent value in the range of (0,100), if success.
xHideAllParts
Hides all parts display of a model.
bool xHideAllParts(StringsModel)
return
Returns True, if successful.
sModel
Model name.
xShowProductExplorerUI
Sets Product explorer GUI tab visibilty.
bool xShowProductExplorerUI(int iTab)
return
Returns True, if succesful.
iTab
Tab index. Valid Range 1-5.
1 - Sceen Tree tab
2 - Parts List tab
3 - Viewpoint Lists tab
4 - Label lists tab
5 - XY plots tab
xGetBackgroundTextureMode
Gets background texture mode.
int xGetBackgroundTextureMode()
return
Returns background image texture mode as integer
0 – Center
1 – Stretch
2 – Tile
3 – Fit View
Returns -1 if it failed to get.
xSetBackgroundTextureMode
Sets background texture mode.
bool xSetBackgroundTextureMode(int iMode)
return
Returns True if successfully mode is set.
Returns False otherwise.
iMode
Texture mode id.
0 – Center
1 – Stretch
2 – Tile
3 – Fit View
xGetImageBackgroundFileName
Gets the image file path used in viewpoint background using viewpoint and viewpath names.
String xGetImageBackgroundFileName(String viewpoint, String vViewPath)
return
Returns file path used in the viewpoint.
Returns empty String if failed.
viewpoint
Viewpoint name.
vViewPath
View path name.
pxGetModelAlignmentTransform
Gets applied transformations relative to the state before model alignment.
List<float> pxGetModelAlignmentTransform(String sModel, int iType)
return
Returns an array of size either 16 or 7 based on iType.
Returns empty array if failed.
sModel
Model name.
iType
0 - Returns an array of 16 values, refers to transform (matrix) applied.
1 - Returns an array of 10 values
array[0]-array[2] - Translation applied
array[3]-array[6] - Rotation applied [angle(radian), axis-x,axis-y, axis-z]
array[7]-array[9] - Scale (For future use)
xSetLineThickness
Sets given thickness to line geometry.
bool xSetLineThickness(int iThickness)
return
Returns True if succeeds, False if failed.
iThickness
Line thickness value in range of 1 to 5.
xSetPointSize
Sets given point size to point geometry.
bool xSetPointSize(int iSize)
return
Returns True if succeeds, False if failed.
iSize
point size value in range of 1 to 5.
pxGetBackgroundColor
Gets viewer background color.
List<float> pxGetBackgroundColor(int iBackgroundMode)
return
Returns an empty array if failed
Returns an array of size 3 if iBackgroundMode=0;
array[0]= red component of plain color;
array[1]= green component of plain color;
array[2]= blue component of plain color;
Returns an array of size 6 if iBackgroundMode=1;
array[0]= red component of top color;
array[1]= green component of top color;
array[2]= blue component of top color;
array[3]= red component of top color;
array[4]= green component of top color;
array[5]= blue component of top color;
xGetBackgroundMode
Gets the viewer background mode.
int xGetBackgroundMode()
return
Returns an integer value referring background.
0 - Plain Background
1 - Gradient Background
2 - Texture Background.
Returns -1 if it fails.