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

IPropertyArray Interface

GetCount
GetProperty
GetName
SetProperty
GetPropertyEx

IPropertyArray is an alternative to QueryInterface() way to obtain access to some generic interfaces. IPropertyArray retrieves interfaces by its name. For example IPropertyArray 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. 

IPropertyArray2 interface is an alternative for environments which can not interpret some of data types present in the interface

See also Properties, IPropertyArray2, 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, IUnknown **ppIUnkn)

Parameters

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

ppIUnkn - [out] pointer to a IUnknown* variable, which will contain interface to the property

Return Values

S_OK in case of success.

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.

HRESULT SetProperty(char* szPropertyName, IUnknown *iUnknown)

Parameters

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

iUnknown - [in] reference to a IUnknown, which will be assigned an appropriate  interface which gives access to the property..

Return Values

S_OK in case of success.

DISP_E_PARAMNOTOPTIONAL - if the property  is not available.

Remarks:
 
AAssigns new value to the property. One usage: When this IPropertyArray is implemented by a model (queried form IModel) call SetProperty("RawUserData", NULL) will delete the unformatted user defined data embedded in the model.

HRESULT GetPropertyEx(char* szPropertyName, int par0, int par1, IUnknown **ppIUnkn)

PParameters

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

par0, par1 - [in] Additional property - dependent parameters.

ppIUnkn -- [out,retval] pointer to a IUnknown* variable, which will contain interface to the property. Most often this interface can be cast to a more complex type specific to the property

Remarks:
 
This method returns the named property of the object. The relevant attributes are created if they did not exist so far. The parameters par0, par1 can be used to specify the type of the created attributes. Meaning of par0, par1 is explained in documentation of each specific property.