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 > Interfaces > Sections > Items > ISmartLabelManager_KC
ISmartLabelManager_KC Interface

ISmartLabelManager_KC Interface

GetLabel
CreateLabelsAutomatic
CreateObjectLabelAutomatic
SetStringSource
GetStringSource
SetTextToRectangleMargin
GetTextToRectangleMargin
AddNewLabel
GetLabelCreationTemplate
GetExtendedProperties

Access to Smart Label Manager. Can be queried from IView. IDynamicScreenItemManager_KC, which can be queried from this interface, provides additional functionality

See also: Smart Labels, Smart Labels sample


HRESULT GetLabel(int index, ILabel3D_KC** label)

Returns index-th managed label


HRESULT CreateLabelsAutomatic()

Creates smart labels one per each section in the model independently on child/parent relationship and adds them to the array of managed items. The labels are created with attributes specified by the template acquired with the GetLabelCreationTemplate method below.

The label is not added if the object already has a smart child label with the same attachment point and text string


HRESULT CreateObjectLabelAutomatic(ISection* object, VARIANT_BOOL includeChildren, VARIANT_BOOL childrenOnly)

Creates smart labels one per each child section of object and adds them to the array of managed items. The labels are created with attributes specified by the template acquired with the GetLabelCreationTemplate method below.

The label is not added if the object already has a smart child label with the same attachment point and text string


HRESULT SetStringSource(EStringSource type)
HRESULT GetStringSource(EStringSource* type)

If type is EStringSource.eStringSourceObjectName labels created during a call to AddNewLabel, CreateLabelsAutomatic or CreateObjectLabelAutomatic have text which is name of the parent object. When type is EStringSource.eStringSourceLayerName layer name of the parent object is used. Otherwise the name specified in the template is used


HRESULT SetTextToRectangleMargin(float textHeightToMarginRatio)
HRESULT GetTextToRectangleMargin(float* textHeightToMarginRatio)

Smart label rectangle size is determined by the text (font) size plus a margin, measured as a ratio of the text height. This property specifies the ratio. The default is 0.15


HRESULT AddNewLabel(ISection* parent, ILabel3D_KC** label)

Creates a new smart label, adds it as a child item of parent and adds it to the array of managed items. ILabel3D_KC is returned for convenience for further modifications. It parent is null the label is created as the last top-level item. The label is created with attributes copied form the template.


HRESULT GetLabelCreationTemplate(ILabel3D_KC** label)

Gives acess to the template, which defines attributes of new labels created with AddNewLabel, CreateLabelsAutomatic or CreateObjectLabelAutomatic


HRESULT GetExtendedProperties(IKCContext** context)

Gives acess to the Extended Properties of smart labels,