Library | File

Class pfcModelItemOwner

# include <pfcModelItem.h>

class pfcModelItemOwner
 : public virtual pfcParent
{
    xaideclare(pfcModelItemOwner)
    ...
};



Description

This is a base class for an object that has model items associated with it (such as a model).
See Also:
pfcModel
Manual References:
ModelItem: Getting ModelItem Objects
Direct Known Subclasses:
pfcModel



Method Summary

optional pfcModelItem_ptrGetItemById (pfcModelItemType Type, xint Id)
Returns the specified model item, given its identifier and type.
optional pfcModelItem_ptrGetItemByName (pfcModelItemType Type, xrstring Name)
Returns a model item, given a string name and type, if it exists.
optional pfcModelItems_ptrListItems (optional pfcModelItemType Type)
Provides a list of model items of the specified type.


Methods Inherited from Class pfcParent:

GetChild



Method Detail

optional pfcModelItem_ptrGetItemByName (pfcModelItemType Type, xrstring Name)

Returns a model item, given a string name and type, if it exists.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - This means either:

  • The specified layer_name does not exist in owner, OR
  • The item was not found, OR
  • The function did not find simplified representation in the solid.


See Also:
pfcModelItem::GetName(), pfcModelItem::SetName(xrstring)
Manual References:
ModelItem: Getting ModelItem Objects, ModelItem: Getting ModelItem Objects
Parameters:
Type
The type of the model item to locate.
Name
The name of the model item to locate.
Returns:
The model item object, or null, if the item was not found.



optional pfcModelItem_ptrGetItemById (pfcModelItemType Type, xint Id)

Returns the specified model item, given its identifier and type.

Exceptions thrown (but not limited to):

pfcXToolkitNotExist - This means either:

  • Feature with such identifier does not exist, OR
  • Item with such id and type does not exist.


Manual References:
ModelItem: Getting ModelItem Objects, ModelItem: Getting ModelItem Objects, Simplified Representations: Simplified Representation Utilities, Simplified Representations: Simplified Representation Utilities, Drawings: Obtaining Drawing Dimensions, Drawings: Obtaining Drawing Dimensions, Drawings: Listing Detail Items, Drawings: Listing Detail Items
Parameters:
Type
The type of the model item (feature, edge, and so on)
Id
The integer identifier of the model item
Returns:
The model item with the specified attributes, or null if a model item withsuch attributes has not been found.



optional pfcModelItems_ptrListItems (optional pfcModelItemType Type)

Provides a list of model items of the specified type.

Following model item types are supported for Solid models ITEM_FEATURE ITEM_SURFACE ITEM_COORD_SYS ITEM_AXIS ITEM_QUILT ITEM_EDGE ITEM_POINT ITEM_CURVE ITEM_LAYER ITEM_SOLID_GEOMETRY ITEM_NOTE ITEM_DIMENSION ITEM_REF_DIMENSION ITEM_EXPLODED_STATE ITEM_SIMPREP
Following model item types are supported for2D models ITEM_TABLE ITEM_DIMENSION ITEM_REF_DIMENSION ITEM_DTL_ENTITY ITEM_DTL_GROUP ITEM_DTL_SYM_DEFINITION ITEM_DTL_SYM_INSTANCE ITEM_DTL_OLE_OBJECT ITEM_LAYER

Manual References:
Geometry Evaluation: Traversing the Geometry of a Solid Block, Geometry Evaluation: Traversing the Geometry of a Solid Block, ModelItem: Getting ModelItem Objects, ModelItem: Getting ModelItem Objects, Simplified Representations: Simplified Representation Utilities, Simplified Representations: Simplified Representation Utilities, Drawings: Obtaining Drawing Dimensions, Drawings: Obtaining Drawing Dimensions, Drawings: Listing Detail Items, Drawings: Listing Detail Items
Parameters:
Type
The type of model items to retrieve. If this parameter is null, then allthe model items will be listed.

Note that only those surfaces associated with solid geometry are included in the list of model items when you specify ITEM_SURFACE or null as the Type . Surfaces of Creo Parametric Surface features and Quilts are not included. To obtain a list of the quilt features with their component datum surfaces, specify ITEM_QUILT.
Returns:
The list of model items, or null if no model items of the specified type has been found.