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 > IPropertyArray2
IPropertyArray2 Interface

IPropertyArray2 Interface

GetCount
GetProperty
GetName

IPropertyArray2 is a modification of IPropertyArray interface, provided for environments which do not recognize IUnknown data type.

IPropertyArray2 is an alternative to QueryInterface() way to obtain access to some generic interfaces. IPropertyArray2 retrieves interfaces by its name. For example IPropertyArray2 implemented by a generic 3D Object has a property named "TextureArray". See Properties topic for the list of all available properties.

In this release all properties are arrays themselves (this not necessarily will be the case in future releases.), which may be confusing. So practically the property array is array of arrays or a method to distinguish between different IArray interfaces implemented by the object. 

See also Properties, Light Sample, Texture Sample, ITexture, IArray Interface, Interface List


HRESULT GetCount(int * pnCount)

Parameters

pnCount- [out] Pointer to an integer variable which will be set to number of properties in the array

Returns

S_OK in case of success.

HRESULT GetProperty(char* szPropertyName, VARIANT* prop)

Parameters

szPropertyName - [in] name of the property to retrieve.

prop - [out] reference to a VARIANT variable, which will be assigned an appropriate  interface which gives access to the property..

Return Values

S_OK in case of success.

DISP_E_BADINDEX - if the index is out of range

DISP_E_PARAMNOTOPTIONAL - if the property  is not available.

Remarks:
 
This method gives access to the named property of the object, which implements the IPropertyArray. Most often actual type of the interface is different from IUnknown and can be cast to the specific type, which is described for each specific use of the IPropertyArray interface. 

HRESULT GetName(int index, char* szName)

Parameters

index - [in] index of the property to retrieve

szName - [out] pointer to a variable, which will be set assigned the name of the property. Maximal length of a property name in the current release is 30 characters. This length can be retrieved programmatically as value of member of enumeration EDIConst. C++ declaration of the enumeration can be found in Samples/VC/Include/DITypes.h file (include DIInterface.h)

Return Values

S_OK in case of success.

DISP_E_BADINDEX - if the index is out of range

DISP_E_PARAMNOTOPTIONAL - if the property  is szName is NULL.

Remarks:
 
Call this method to query for available properties.