The RxPrinter3D Object
Component name: RxPrint3DCOM.dll
RxPrinter3D Methods
PrintClippedToDC
Prints the given document's active page on the provided printer device context. Parameters like scale and matrix control how the document is printed. Use this method if you create the printer context yourself. If you are using MFC or other frameworks, you will get the printer device from the framework, and this method can be used to print using that device.
Syntax
HRESULT PrintClippedToDC(long DC, LPDISPATCH Doc, LPVARIANT Matrix, long DspL, long DspT, long DspW, long DspH, double FileL, double FileT, double Scale)
Parameters
- DC: Handle of the printer device context.
- Doc: Document (
IRxDoc) pointer. - Matrix: 4x4 matrix.
- DspL: Left start position (printer device coordinates).
- DspT: Top start position (printer device coordinates).
- DspW: Width of the destination area in printer device coordinates.
- DspH: Height of the destination area in printer device coordinates.
- FileL: X coordinate of the point in the document that corresponds to the printer start position.
- FileT: Y coordinate of the point in the document that corresponds to the printer start position.
- Scale: Scaling factor.
Returns
HRESULT:S_OK/E_FAIL
GetPlane
Returns the definition for the specified clipping plane as given by its four coefficients. Six different planes are supported (index 0 to 5).
Syntax
GetPlane(long lPlane, double *A, double *B, double *C, double *D)
Parameters
- lPlane: Index of the clipping plane.
- A: A coefficient.
- B: B coefficient.
- C: C coefficient.
- D: D coefficient.
Returns
HRESULT:S_OK/E_FAIL
SetPlane
Defines the specified clipping plane. The plane index must be an integer between 0 and 5.
Syntax
SetPlane(long lPlane, double A, double B, double C, double D)
Parameters
- lPlane: Index of the clipping plane.
- A: A coefficient.
- B: B coefficient.
- C: C coefficient.
- D: D coefficient.
Returns
HRESULT:S_OK/E_FAIL
RxPrinter3D Properties
Ambient
- Type:
long - Parameter: Face (
RX_MATERIAL_FRONTorRX_MATERIAL_BACK) - Access: Read and write
- Description: Color value to use for ambient reflectance.
BackgroundColor
- Type:
long - Access: Read and write
- Description: Background color used when drawing the model.
ClippingEnabled
- Type:
long - Access: Read and write
- Description: If
true, the clipping settings will be used when drawing the model.
ClipPlaneEnabled
- Type:
long - Parameter:
long(clipping plane, value from 0 to 5) - Access: Read and write
- Description: If
true, the specified clipping plane is enabled.
ClipPlaneVisible
- Type:
long - Parameter:
long(clipping plane, value from 0 to 5) - Access: Read and write
- Description: If
true, the specified clipping plane is visible.
ColorTracking
- Type:
long - Parameter: Face (
RX_MATERIAL_FRONTorRX_MATERIAL_BACK) - Access: Read and write
- Description: If
true, the model's original colors will be used.
Descriptor
- Type:
long - Access: Read only
- Description: This property is only for internal usage.
Diffuse
- Type:
long - Parameter: Face (
RX_MATERIAL_FRONTorRX_MATERIAL_BACK) - Access: Read and write
- Description: Color value to use for diffuse reflectance.
Emission
- Type:
long - Parameter: Face (
RX_MATERIAL_FRONTorRX_MATERIAL_BACK) - Access: Read and write
- Description: Sets or gets the emissive color value.
EnableExplode
- Type:
long - Access: Read and write
- Description: Sets or gets the explode enable status. If a non-zero value is given, the
Explodefunction is currently active. SeeExplodeDistancefor more information about explode functionality.
ExplodeDistance
- Type:
double - Access: Read and write
- Description: Sets or gets the current model explode factor. Explode can be used to move all parts in an assembly apart from one another, providing a better impression of how the model is built. The explode distance is a scale; an explode distance of
1.50will increase the distance between all parts by 50% more than the original distance. UseEnableExplodeto turn the explode function on or off.
ExtentsColor
- Type:
long - Access: Read and write
- Description: Controls the color to use when drawing extents (requires
ShowExtentsto be enabled).
HiddenLineRemoval
- Type:
long - Access: Read and write
- Description: If
true, hidden lines will be removed when a model is shown in wireframe mode.
IFCDisplayState
- Type:
long - Access: Read and write
- Description: Controls which types of IFC elements are printed. You can use this to turn off specific elements, such as
ifcSpaceelements, while printing all other types. The following table shows which elements can be turned off or on:Value Elements Affected 0 No elements are displayed. 0xFFFFFFFF All elements are displayed. 0x00000001 ifcSpaceelements are displayed.0x00000002 ifcWallelements are displayed.0x00000004 ifcSlabelements are displayed.0x00000008 ifcRoofelements are displayed.0x00000010 ifcDoorelements are displayed.0x00000020 ifcWindowelements are displayed.0x00000040 ifcBeamelements are displayed.0x00000080 ifcColumnelements are displayed.0x00000100 ifcStairandifcStairFlightelements are displayed.0x00000200 ifcFurnishingElementelements are displayed.0x00000400 ifcRailingelements are displayed.0x00000800 ifcCoveringelements are displayed.0x00001000 ifcFlowSegment,ifcFlowController,ifcFlowFitting,ifcFlowMovingDevice, andifcFlowTerminalelements are displayed.0x00002000 ifcPlateelements are displayed.0x00004000 ifcMemberelements are displayed.0x00008000 ifcProxyelements are displayed.0x00010000 ifcSiteelements are displayed.
Usage Notes
- Use the OR operand to combine values.
- Examples:
- To print all elements except
ifcSpace, use(0xFFFFFFFF & ~1), which gives the value0xFFFFFFFE. - To print only
ifcWallandifcSlab(walls and floors), use6(0x00000006).
- To print all elements except
MaterialsEnabled
- Type:
long - Access: Read and write
- Description: If
true, material settings will be used when drawing the model.
Projection
- Type:
long - Access: Read and write
- Description: Set to
trueif the model should be drawn using perspective projection.
Shininess
- Type:
long - Parameter: Face (
RX_MATERIAL_FRONTorRX_MATERIAL_BACK) - Access: Read and write
- Description: Shininess factor (0 to 128).
ShowExtents
- Type:
long - Access: Read and write
- Description: If
true, the extents of the model will be drawn by the draw methods.
Specular
- Type:
long - Parameter: Face (
RX_MATERIAL_FRONTorRX_MATERIAL_BACK) - Access: Read and write
- Description: Color value to use for specular reflectance.
Version
- Type:
BSTR - Access: Read only
- Description: Returns the version of the currently installed
RxPrint3DCOMcomponent.
WireFrame
- Type:
long - Access: Read and write
- Description: If
true, the model will be drawn in wireframe mode.