KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > KernelCAD Components > Printing Support
Printing Support

Printing Support

KernelCAD views can be printed using IPrint_KC obtained via: KernelCAD > GetView > IView > IPrint_KC.

When the view is two dimensional, the 2D scene can be saved in true Extended Windows Metafile (.emf) or Windows Metafile (.wmf) formats and used as an embedded part of a document. To save 2D scene as a metafile use .emf or .wmf file name extension in a call to the SaveAs method of the component. 

When a IPrint_KC is acquired KernelCAD creates a separate two dimensional view (Printing View), which can be acquired with IPrint_KC.Get2DView

Above allows modification of printer-specific settings separate from setting for the component window, which are most often quite different because of the difference in resolution and shape of the displayed area. The settings can be accessed via:

IPrint_KC -> IPrint_KC.Get2DView. ->I2DView_KC -> I2DView_KC.GetContext -> IKCContext. -> 2D View Properties

When the printing view is first created its settings are copied form the 2D View of the components window. The Printing View along with all selected settings is destroyed when the last reference to the 2D view is released by the application (goes out of scope). Store reference to I2DView_KC or any queried form it interfaces in an object with long life span to keep it alive.

To embed a high resolution  image generated by a 3D view into a printed document use IVirtualView to render into a bitmap with arbitrary resolution and insert the bitmap into the document, with possible conversion to a compressed 2D picture format. See also Capture Sample