[mxcad_3d API Document](../README. md)/Mx3dView
Class: Mx3dView 
Base class for managing the lifecycle of objects
Hierarchy 
- ↳ - Mx3dView
Table of contents 
Methods 
- addModelTexture
- displayDimension
- displaySymbolText
- enableCustomClipPlane
- enableDirLightSrc
- enableXClipPlane
- enableYClipPlane
- enableZClipPlane
- fitAllObjects
- getDocument
- removeAll
- removeModelTexture
- removeSelected
- setCubemapBackground
- setCustomClipPlaneDirection
- setCustomClipPlanePosition
- setCustomClipPlaneReverse
- setDisplayMode
- setGradientBgColor
- setManipulatorEnabled
- setProj
- setProjectionType
- setSelectedColor
- setSelectedMaterial
- setXClipPlaneReverse
- setXClipPlaneXPosition
- setYClipPlaneReverse
- setYClipPlaneYPosition
- setZClipPlaneReverse
- setZClipPlaneZPosition
- showCenterTrihedron
- update
Methods 
addModelTexture 
▸ addModelTexture(theFileName): void
Set texture mapping for the currently selected object
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheFileName | string | The complete path of the image in the file system | 
Returns 
void
displayDimension 
▸ displayDimension(theDimension): void
Display annotation symbols
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheDimension | [Mx3dDimObject] (Mx3dDimObject. md) | Annotation Symbol Object | 
Returns 
void
displaySymbolText 
▸ displaySymbolText(theSymbol): void
Display text symbols
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheSymbol | [Mx3dSymbolText] (Mx3dSymbolText. md) | Text symbol object | 
Returns 
void
enableCustomClipPlane 
▸ enableCustomClipPlane(theToEnabled): void
Enable/disable user-defined cutting surfaces
Parameters 
| Name | Type | Description | 
|---|---|---|
| theToEnabled | boolean | Whether to enable user-defined cutting planes | 
Returns 
void
enableDirLightSrc 
▸ enableDirLightSrc(theToEnabled): void
Parameters 
| Name | Type | 
|---|---|
| theToEnabled | boolean | 
Returns 
void
enableXClipPlane 
▸ enableXClipPlane(theToEnabled): void
Turn on/off the X-axis section plane
Parameters 
| Name | Type | Description | 
|---|---|---|
| theToEnabled | boolean | Whether to enable the X-axis section plane | 
Returns 
void
enableYClipPlane 
▸ enableYClipPlane(theToEnabled): void
Turn on/off Y-axis cutting plane
Parameters 
| Name | Type | Description | 
|---|---|---|
| theToEnabled | boolean | Whether to enable Y-axis cutting plane | 
Returns 
void
enableZClipPlane 
▸ enableZClipPlane(theToEnabled): void
Turn on/off Z-axis cutting plane
Parameters 
| Name | Type | Description | 
|---|---|---|
| theToEnabled | boolean | Whether to enable Z-axis cutting plane | 
Returns 
void
fitAllObjects 
▸ fitAllObjects(theAuto): void
Scale all objects in the view to fit the entire view
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheAuto | boolean | Auto scaling | 
Returns 
void
getDocument 
▸ getDocument(): Mx3dDbDocument
Retrieve the document of the current document view object
Returns 
Return document object
removeAll 
▸ removeAll(theUpdateView?): void
Remove all
Parameters 
| Name | Type | Default value | Description | 
|---|---|---|---|
| Update View | boolean | true | Update view immediately after removal | 
Returns 
void
removeModelTexture 
▸ removeModelTexture(): void
Remove the texture map of the currently selected object
Returns 
void
removeSelected 
▸ removeSelected(): void
Remove Selection
Returns 
void
setCubemapBackground 
▸ setCubemapBackground(theRight, theLeft, theTop, theBottom, theFront, theBack): void
Parameters 
| Name | Type | 
|---|---|
| theRight | string | 
| theLeft | string | 
| theTop | string | 
| theBottom | string | 
| theFront | string | 
| theBack | string | 
Returns 
void
setCustomClipPlaneDirection 
▸ setCustomClipPlaneDirection(x, y, z): void
Set the normal direction of user-defined cutting planes
Parameters 
| Name | Type | Description | 
|---|---|---|
| X | number | normal x-component | 
| Y | number | normal y-component | 
| Z | number | normal z-component | 
Returns 
void
setCustomClipPlanePosition 
▸ setCustomClipPlanePosition(thePosition): void
Set the position of user-defined cutting planes
Parameters 
| Name | Type | Description | 
|---|---|---|
| ThePosition | Number | The position of the cutting plane relative to the origin of the world coordinate system | 
Returns 
void
setCustomClipPlaneReverse 
▸ setCustomClipPlaneReverse(): void
Flip user-defined cutting surface
Returns 
void
setDisplayMode 
▸ setDisplayMode(theMode): void
Set the current display mode
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheMode | [MxGlobalDisplay Mode] (../enums/MdGe. MxGlobalDisplay Mode. md) | Display Mode | 
Returns 
void
setGradientBgColor 
▸ setGradientBgColor(theColor1, theColor2, theMethod): void
Set gradient background color
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheColor1 | [Mx3dGeColor] (Mx3dGeColor. md) | Color Object 1 | 
| TheColor2 | [Mx3dGeColor] (Mx3dGeColor. md) | Color Object 2 | 
| TheMethod | [MxRadiantFillMethod] (../enums/MdGe. MxRadiantFillMethod. md) | Gradient Method | 
Returns 
void
setManipulatorEnabled 
▸ setManipulatorEnabled(isEnabled): void
Parameters 
| Name | Type | 
|---|---|
| isEnabled | boolean | 
Returns 
void
setProj 
▸ setProj(theOrientation, theIsYup): void
Set view orientation
Parameters 
| Name | Type | Description | 
|---|---|---|
| The Orientation | [MxV3dTypeOfOrientation] (../enums/MdGe. MxV3dTypeOfOrientation. md) | View Direction | 
| TheIsYup | boolean | Is the Y-axis upward | 
Returns 
void
setProjectionType 
▸ setProjectionType(theProjection): void
Set the view projection mode
Parameters 
| Name | Type | Description | 
|---|---|---|
| The Projection | [MxCameraProduction] (../enums/MdGe. MxCameraProduction. md) | Projection Mode | 
Returns 
void
setSelectedColor 
▸ setSelectedColor(color): void
Set the color of the currently selected object
Parameters 
| Name | Type | Description | 
|---|---|---|
| Color | [Mx3dGeColor] (Mx3dGeColor. md) | Color | 
Returns 
void
setSelectedMaterial 
▸ setSelectedMaterial(material): void
Set the material of the selected object
Parameters 
| Name | Type | Description | 
|---|---|---|
| Material | [Mx3dGeMaterial] (Mx3dGeMaterial. md) | Material | 
Returns 
void
setXClipPlaneReverse 
▸ setXClipPlaneReverse(): void
Flip the X-axis section plane
Returns 
void
setXClipPlaneXPosition 
▸ setXClipPlaneXPosition(thePosition): void
Set the position of the X-axis cutting plane
Parameters 
| Name | Type | Description | 
|---|---|---|
| ThePosition | Number | The position of the cutting plane relative to the origin of the world coordinate system | 
Returns 
void
setYClipPlaneReverse 
▸ setYClipPlaneReverse(): void
Flip the Y-axis section plane
Returns 
void
setYClipPlaneYPosition 
▸ setYClipPlaneYPosition(thePosition): void
Set the position of the Y-axis cutting plane
Parameters 
| Name | Type | Description | 
|---|---|---|
| ThePosition | Number | The position of the cutting plane relative to the origin of the world coordinate system | 
Returns 
void
setZClipPlaneReverse 
▸ setZClipPlaneReverse(): void
Flip the Z-axis section plane
Returns 
void
setZClipPlaneZPosition 
▸ setZClipPlaneZPosition(thePosition): void
Set the position of the Z-axis cutting plane
Parameters 
| Name | Type | Description | 
|---|---|---|
| ThePosition | Number | The position of the cutting plane relative to the origin of the world coordinate system | 
Returns 
void
showCenterTrihedron 
▸ showCenterTrihedron(theToShow): void
Display the central coordinate axis
Parameters 
| Name | Type | Description | 
|---|---|---|
| thetoShow | boolean | True displays, false does not display | 
Returns 
void
update 
▸ update(isUpAllData?, isRemoveAll?): void
update display
Parameters 
| Name | Type | Default value | Description | 
|---|---|---|---|
| IsUpAllData | boolean | true | Update all data | 
| IsRemoveAll | boolean | true | Do you want to remove all data first | 
Returns 
void