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 > Programming Samples and Tutorials > Delphi Samples > KernelCAD and Delphi
KernelCAD and Delphi

KernelCAD Component in Delphi

The steps below describe integration of KernelCAD control into Delphi IDE. These steps are needed when using KernelCAD for the first time in Delphi other than  RAD Studio 10.1 Berlin or upgrading Delphi IDE

Please read the relevant section to perform specific steps to compile the KernelCAD runtime package to make the IDE aware of KernelCAD

RAD Studio

These steps refer to RAD Studio 10.1 Berlin. Other versions should have similar user interface

  • In the menu of Delphi IDE Select Component > Import Component
  • Select Import ActiveX Control in the form and press Next
  • Select the KernelCAD Pro ActiveX Control in the list. Click Next
  • Change Unit Dir Name to C:\Projects\KernelCAD_5_2\Samples\Delphi\V5_2\ or similar if KernelCAD was installed at non-default location and click Next
  • Make sure Create Unit option is on and click Finish. This will create the KERNELCADLib_TLB.pas file
  • In File menu of RAD Studio select New > Package - Delphi
  • Save the project as C:\Projects\KernelCAD_5_2\Samples\Delphi\V5_2\KernCAD.dproj
  • Right-click on KernelAD.bpl in Project Manager and use Add command to select the KERNELCADLib_TLB.pas
  • Click Yes to add the Visual Component Library
  • Right-click on KernelAD.bpl in Project Manager and select Build
  • Press OK if you are asked to add vcl package
  • Right-click on KernelAD.bpl in Project Manager and select Install

The above steps will create KERNELCADLib_TLB.dcu file which will be used at runtime by KernelCAD samples. Add this path to Project Options > Delphi Compiler >Search Path when creating a new project

When debugging KernelCAD samples open *_10_* projects, which have been updated for RAD Studio. The Samples_10_1.groupproj contains all samples

Delphi XE

This section is based on Embarcadero Delphi XE3.

To add KernelCAD control to the tool palette in menu of Delphi IDE:

  • Select Component > Import Component
  • Select Import ActiveX Control in the form and press Next
  • Select the KernelCAD Pro ActiveX Control in the list. Click Next
  • Select all default options in the following pages. This will create KERNELCADLib_TLP.pas file. Remember its location
  • Create new project to compile KERNELCADLib_TLP.pas into a package imporatble into IDE:
  • In File menu go to New > Other (project type). In Delphi Projects folder select Package in the right hand panel
  • Add the KERNELCADLib_TLP.pas to the project
  • In the Project Manager tab of the IDE right-click on the project name (Package1.bpl by default) and select Compile
  • When compilation is completed right-click again on the project and select Install
  • After the above ActiveX category should appear on the Tool Palette. Click on TKernelCAD and draw a rectangle on your form where the control should be placed
  • Copy code from Delphi samples (Patch is the simplest one) and consult the installed help to acces KernelCAD functionality programmaticaly

Delphi 7  Borland Developer Studio 2006 for Win 32 (BDS)

It is recommended to make the next manual change in the generated file: Search and and remove packed keyword from three lines:

DISectInfo = packed record

DI3DSectInfo = packed record

MetrDistContext = packed record

Samples|Delphi\TypeLib folder contains KERNELCADLib_TLB.pas with above modifications

 

Contact us to obtain copy of the samples for earlier versions of Delphi

See also: Delphi Samples.