DG Kernel Documentation


Skip Navigation Links.
Skip Navigation LinksHome Page > Deprecated > Deprecated API Reference > Model > Section > ISection Search Documentation


ISection Interface

GetEntityType
GetName
SetName
GetGeomResolution
SetGeomResolution
GetChildCount
GetChild
GetVisibleFlag
SetVisible
GetParent
GetItemCount
GetItem

ISection interface should be rather called IObject. It is implemented by each object in the model. ISection controls common properties of an object and gives access to other interfaces related to geometry of the object.

ISection of a top-level object of the model can be obtained either via query: DG Kernel>GetModel>IModel>GetEntity. ISection of a child object can be obtained from ISection of its parent with a call to GetChild method.

See also Patch Tutorial, MiniCAD Sample, Interface List


HRESULT GetEntityType(char* szType)

Parameters

szType - [out] pointer to the string which will contain the object type name. 

 Remarks
Returns type name of the object.

HRESULT GetName(char* szName)

Parameters

szName - [out] pointer to the string which will contain object name.

Remarks
Object name is an optional name assigned to the object to distinguish from another entities during modelling and runtime access.

HRESULT SetName(char* szName)

Parameters

szName - [in] pointer to the string which will contain object name.

Remarks
Object name is an optional name assigned to the object to distinguish from another entities during modelling  and runtime access.

HRESULT GetGeomResolution(int *pnRes)

Parameters

pnRes- [out] pointer to an integer variable, which will contain the resolution

Remarks
See remarks for the SetGeomResolution method below.

HRESULT SetGeomResolution(int nRes)

Parameters

nRes - [in] New resolution.

Remarks
The Geometrical resolution is a positive integer which determines how fine is approximation of the surface. Increasing this number leads to a better surface rendering but increases computational load on the machine. Geometrical resolution is set on per object basis and is saved with the model.

HRESULT GetChildCount(int *pnCount)

Parameters

pnCount - [out] pointer to an integer variable which will receive the number of children this object has.

Remarks:

Returns the number of child entities, which are joined to this object. See also Structure of DI Models.


HRESULT GetChild (int index, ISection **ppIEntity)

Parameters

index - [in] zero-based index of the object.

ppIEntity - [out] returned pointer to ISection interface. 

Return Values

S_OK in case of success
DISP_E_BADINDEX - if index is negative or greater than or equal to number of objects in the model.
Remarks:
The method returns a reference to ISection Interface of the index-th child object. Call Release() on the obtained interface when finished with it. See also Structure of DI Models.

HRESULT GetVisibleFlag(bool *pbVisible)

Parameters

pbVisible - [out] pointer to a Boolean variable which will be set to true if the object is currently visible.

Remarks:

Call to retrieve the current visibility status.


HRESULT SetVisible(bool bVisible)

Parameters

bVisible - [in] if false the object will not be rendered in the model.

Remarks:

Call to change the current visibility status.


HRESULT GetParent(ISection **ppIEntity)

Parameters

ppIEntity - [out] pointer to the variable, which will receive ISection pointer, implemented by the parent, or NULL value. 

Remarks:

If the entity (which implements this ISection) does not have a parent, the ISection* variable pointed to by ppIEntity will be set to NULL but the method will return S_OK. The method can be used to check if the object has a parent. Otherwise it is a top-level object in the model.


HRESULT GetItemCount(int* count)

Parameters

count - [out] pointer to the variable, which will receive the count

Remarks:

Returns the number of non-entity child items of the entity


HRESULT GetItem(int index, IItem **iItem)

Parameters

iItem - [out] pointer to the variable, which will receive IItem pointer