Skip to content

[mxcad_3d API Document](../README. md)/Mx3dView

Class: Mx3dView

Base class for managing the lifecycle of objects

Hierarchy

Table of contents

Methods

Methods

addModelTexture

addModelTexture(theFileName): void

Set texture mapping for the currently selected object

Parameters

NameTypeDescription
TheFileNamestringThe complete path of the image in the file system

Returns

void


displayDimension

displayDimension(theDimension): void

Display annotation symbols

Parameters

NameTypeDescription
TheDimension[Mx3dDimObject] (Mx3dDimObject. md)Annotation Symbol Object

Returns

void


displaySymbolText

displaySymbolText(theSymbol): void

Display text symbols

Parameters

NameTypeDescription
TheSymbol[Mx3dSymbolText] (Mx3dSymbolText. md)Text symbol object

Returns

void


enableCustomClipPlane

enableCustomClipPlane(theToEnabled): void

Enable/disable user-defined cutting surfaces

Parameters

NameTypeDescription
theToEnabledbooleanWhether to enable user-defined cutting planes

Returns

void


enableDirLightSrc

enableDirLightSrc(theToEnabled): void

Parameters

NameType
theToEnabledboolean

Returns

void


enableXClipPlane

enableXClipPlane(theToEnabled): void

Turn on/off the X-axis section plane

Parameters

NameTypeDescription
theToEnabledbooleanWhether to enable the X-axis section plane

Returns

void


enableYClipPlane

enableYClipPlane(theToEnabled): void

Turn on/off Y-axis cutting plane

Parameters

NameTypeDescription
theToEnabledbooleanWhether to enable Y-axis cutting plane

Returns

void


enableZClipPlane

enableZClipPlane(theToEnabled): void

Turn on/off Z-axis cutting plane

Parameters

NameTypeDescription
theToEnabledbooleanWhether to enable Z-axis cutting plane

Returns

void


fitAllObjects

fitAllObjects(theAuto): void

Scale all objects in the view to fit the entire view

Parameters

NameTypeDescription
TheAutobooleanAuto scaling

Returns

void


getDocument

getDocument(): Mx3dDbDocument

Retrieve the document of the current document view object

Returns

Mx3dDbDocument

Return document object


removeAll

removeAll(theUpdateView?): void

Remove all

Parameters

NameTypeDefault valueDescription
Update ViewbooleantrueUpdate 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

NameType
theRightstring
theLeftstring
theTopstring
theBottomstring
theFrontstring
theBackstring

Returns

void


setCustomClipPlaneDirection

setCustomClipPlaneDirection(x, y, z): void

Set the normal direction of user-defined cutting planes

Parameters

NameTypeDescription
Xnumbernormal x-component
Ynumbernormal y-component
Znumbernormal z-component

Returns

void


setCustomClipPlanePosition

setCustomClipPlanePosition(thePosition): void

Set the position of user-defined cutting planes

Parameters

NameTypeDescription
ThePositionNumberThe 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

NameTypeDescription
TheMode[MxGlobalDisplay Mode] (../enums/MdGe. MxGlobalDisplay Mode. md)Display Mode

Returns

void


setGradientBgColor

setGradientBgColor(theColor1, theColor2, theMethod): void

Set gradient background color

Parameters

NameTypeDescription
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

NameType
isEnabledboolean

Returns

void


setProj

setProj(theOrientation, theIsYup): void

Set view orientation

Parameters

NameTypeDescription
The Orientation[MxV3dTypeOfOrientation] (../enums/MdGe. MxV3dTypeOfOrientation. md)View Direction
TheIsYupbooleanIs the Y-axis upward

Returns

void


setProjectionType

setProjectionType(theProjection): void

Set the view projection mode

Parameters

NameTypeDescription
The Projection[MxCameraProduction] (../enums/MdGe. MxCameraProduction. md)Projection Mode

Returns

void


setSelectedColor

setSelectedColor(color): void

Set the color of the currently selected object

Parameters

NameTypeDescription
Color[Mx3dGeColor] (Mx3dGeColor. md)Color

Returns

void


setSelectedMaterial

setSelectedMaterial(material): void

Set the material of the selected object

Parameters

NameTypeDescription
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

NameTypeDescription
ThePositionNumberThe 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

NameTypeDescription
ThePositionNumberThe 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

NameTypeDescription
ThePositionNumberThe 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

NameTypeDescription
thetoShowbooleanTrue displays, false does not display

Returns

void


update

update(isUpAllData?, isRemoveAll?): void

update display

Parameters

NameTypeDefault valueDescription
IsUpAllDatabooleantrueUpdate all data
IsRemoveAllbooleantrueDo you want to remove all data first

Returns

void