Library | File

Class pfcModel2D

# include <pfcModel2D.h>

class pfcModel2D
 : public virtual pfcSheetOwner,
 : public virtual pfcDetailItemOwner,
 : public virtual pfcTableOwner,
 : public virtual pfcModel
{
    xaideclare(pfcModel2D)
    ...
};



Description

This interface represents a two-dimensional Creo Parametric model.
See Also:
pfcBaseSession::ListModels(), pfcBaseSession::GetModel(xrstring, pfcModelType), pfcBaseSession::GetModelFromDescr(pfcModelDescriptor_ptr), pfcBaseSession::CreateDrawingFromTemplate(xrstring, xrstring, pfcModelDescriptor_ptr, pfcDrawingCreateOptions_ptr), pfcBaseSession::Import2DModel(xrstring, pfcModelType, xrstring, pfcImport2DInstructions_ptr), pfcDrawing, pfcReport, pfcLayout
Direct Known Subclasses:
pfcDrawing, pfcReport, pfcLayout, wfcWModel2D



Method Summary

voidAddModel (pfcModel_ptr NewModel)
Adds a solid model to the drawing.
voidAddSimplifiedRep (pfcSimpRep_ptr SimplifiedRep)
Adds a new simplified representation of a model to a drawing.
optional pfcDimensions_ptrCollectShownDimensions (pfcSolid_ptr SolidMdl)
 
optional pfcDimensions_ptrCollectShownRefDimensions (pfcSolid_ptr SolidMdl)
 
pfcDimension_ptrCreateDimension (pfcDimensionAttachments_ptr Attachments, pfcDimSenses_ptr Senses, pfcDimOrientationHint hint, pfcPoint2D_ptr Location)
 
pfcDimension2D_ptrCreateDrawingDimension (pfcDrawingDimCreateInstructions_ptr Instructions)
DEPRECATED: since Creo 4
SUCCESSOR(S): pfcModel2D::CreateRefDimension, pfcModel2D::CreateDimension

Creates a new drawing dimension.
pfcDimension_ptrCreateRefDimension (pfcDimensionAttachments_ptr Attachments, pfcDimSenses_ptr Senses, pfcDimOrientationHint hint, pfcPoint2D_ptr Location)
 
pfcView2D_ptrCreateView (pfcView2DCreateInstructions_ptr Instructions)
Creates a new view in the drawing.
voidDeleteModel (pfcModel_ptr Model)
Removes a model from the drawing.
voidDeleteSimplifiedRep (pfcSimpRep_ptr SimplifiedRep)
Deletes a simplified representation of a model from a drawing.
optional pfcModel_ptrGetCurrentSolid ()
Gets the current solid model of the drawing
xrealGetTextHeight ()
voidSetTextHeight (xreal value)
The text height of the model. The model must be in the current window inorderto access this property.
optional pfcView2D_ptrGetViewByName (xrstring ViewName)
Returns a drawing view, given its name.
optional pfcView2D_ptrGetViewDisplaying (pfcBaseDimension_ptr Dim)
Returns the drawing view that displays a dimension.
pfcView2Ds_ptrList2DViews ()
Lists the drawing views.
optional pfcModels_ptrListModels ()
Lists the models used in the drawing.
pfcDimension2Ds_ptrListShownDimensions (pfcModel_ptr Model, optional pfcModelItemType Type)
DEPRECATED: since Creo 4
SUCCESSOR(S): pfcModel2D::CollectShownRefDimensions, pfcModel2D::CollectShownDimensions

Lists the solid-model owned dimensions and reference dimensions shown in the drawing.
optional pfcSimpReps_ptrListSimplifiedReps (pfcModel_ptr Solid)
Returns a list of the simplified representations referenced by the drawing.
voidRegenerate ()
Regenerates the drawing draft entities.
voidReplaceModel (pfcModel_ptr FromModel, pfcModel_ptr ToModel, xbool Unrepresent)
Replaces a drawing model solid with another solid. The old and new solids must be members of the same family table.
voidSetCurrentSolid (pfcModel_ptr NewCurrentSolid)
Sets the current solid model for the drawing.
voidSetViewDisplaying (pfcBaseDimension_ptr Dim, pfcView2D_ptr NewView)
Sets the view that shows the model dimension.


Methods Inherited from Class pfcSheetOwner:

GetNumberOfSheets, GetCurrentSheetNumber, SetCurrentSheetNumber, AddSheet, ReorderSheet, GetSheetData, GetSheetInfo, GetSheetTransform, RegenerateSheet, DeleteSheet, GetSheetScale, SetSheetScale, GetSheetFormat, SetSheetFormat, GetSheetBackgroundView, GetSheetUnits, GetSheetFormatDescr


Methods Inherited from Class pfcDetailItemOwner:

ListDetailItems, GetDetailItem, CreateDetailItem, CreateFreeNote, CreateOffsetNote, CreateOnItemNote, CreateLeaderNote, RetrieveSymbolDefinition, RetrieveSymbolDefItem, AllowReadonlyNoteSelection


Methods Inherited from Class pfcTableOwner:

ListTables, GetTable, CreateTable, RetrieveTable, RetrieveTableByOrigin, UpdateTables, DeleteTable


Methods Inherited from Class pfcParent:

GetChild


Methods Inherited from Class pfcModelItemOwner:

GetItemByName, GetItemById, ListItems


Methods Inherited from Class pfcViewOwner:

RetrieveView, GetView, SaveView, GetCurrentViewTransform, SetCurrentViewTransform, CurrentViewRotate, ListViews, GetCurrentView


Methods Inherited from Class pfcChild:

GetDBParent, GetOId


Methods Inherited from Class pfcActionSource:

AddActionListener, RemoveActionListener, AddActionListenerWithType


Methods Inherited from Class pfcRelationOwner:

DeleteRelations, GetRelations, SetRelations, RegenerateRelations, EvaluateExpression


Methods Inherited from Class pfcParameterOwner:

GetParam, CreateParam, ListParams, SelectParam, CreateParamWithUnits, SelectParameters


Methods Inherited from Class pfcModel:

GetDescr, GetRelationId, GetIsModified, GetVersionStamp, GetRevision, GetVersion, GetBranch, GetReleaseLevel, GetCommonName, SetCommonName, IsCommonNameModifiable, GetFullName, GetInstanceName, GetGenericName, GetType, GetFileName, Backup, Copy, CopyAndRetrieve, Rename, Save, Erase, EraseWithDependencies, Delete, Display, DisplayInNewWindow, ListDependencies, ListDeclaredModels, CreateLayer, Export, Import, AccessExternalData, TerminateExternalData, CheckIsSaveAllowed, CheckIsModifiable, GetOrigin, GetPostRegenerationRelations, SetPostRegenerationRelations, RegeneratePostRegenerationRelations, DeletePostRegenerationRelations, CleanupDependencies, IsNativeModel, ExportIntf3D, SetIntf3DLayerSetupFile, IsIntf3DLayerSetupFileIgnored, IsIntf3DCsysIgnored, ClearIntf3DModelData



Method Detail

xrealGetTextHeight ()
voidSetTextHeight (xreal value)

The text height of the model. The model must be in the current window inorderto access this property.
Manual References:
Drawings: Drawing Information, Drawings: Drawing Operations, Drawings: Drawing Operations




pfcView2Ds_ptrList2DViews ()

Lists the drawing views.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - No views were found


Manual References:
Drawings: Obtaining Drawing Views, Drawings: Obtaining Drawing Views, Drawings: Instructions
Returns:
The drawing views found. This does not include the drawing sheet background view(s), returned by pfcSheetOwner::GetSheetBackgroundView(xint).



optional pfcView2D_ptrGetViewByName (xrstring ViewName)

Returns a drawing view, given its name.
Manual References:
Drawings: Obtaining Drawing Views, Drawings: Obtaining Drawing Views
Parameters:
ViewName
The name of the drawing view.
Returns:
The drawing view, or null, if the view does not exist.



optional pfcView2D_ptrGetViewDisplaying (pfcBaseDimension_ptr Dim)

Returns the drawing view that displays a dimension.

Works for solid and drawing dimensions.

Exceptions thrown (but not limited to):

pfcXToolkitNotDisplayed - The dimension is not displayed in the drawing.


Manual References:
Drawings: Obtaining Drawing Views, Drawings: Obtaining Drawing Views
Parameters:
Dim
The dimension object.
Returns:
The view where the dimension is displayed, or null, if the dimension is not displayed in the drawing.



pfcView2D_ptrCreateView (pfcView2DCreateInstructions_ptr Instructions)

Creates a new view in the drawing.

Before calling this method, display the drawing using the pfcModel::Display() method.

Exceptions thrown (but not limited to):

pfcXToolkitCreateViewBadSheet - The specified sheet does not exist.

pfcXToolkitCreateViewBadModel - The specified model is not in the list of drawing models, or the function cannot make the specified view of this model.

pfcXToolkitCreateViewBadExplode - The function cannot explode the view model.

pfcXToolkitCreateViewBadParent - The parent view for project does not exist, or is of unsupported type, or does not align with the selected position.


See Also:
pfcGeneralViewCreateInstructions, pfcProjectionViewCreateInstructions
Manual References:
Drawings: Drawing Operations, Drawings: Creating Drawing Views
Parameters:
Instructions
Data object containing details about how to create the view.
Returns:
The newly created drawing view.



voidSetViewDisplaying (pfcBaseDimension_ptr Dim, pfcView2D_ptr NewView)

Sets the view that shows the model dimension.

Before calling this method, dimension should be displayed in the drawing.

Exceptions thrown (but not limited to):

pfcXToolkitCantWrite - Could not delete the given item because it has read-only access.


Manual References:
Drawings: Drawing Dimensions Operations
Parameters:
Dim
The model dimension.
NewView
The view in which to show this dimension.
Returns:



optional pfcModel_ptrGetCurrentSolid ()

Gets the current solid model of the drawing

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - No current model is assigned to the drawing.


Manual References:
Drawings: Drawing Information, Drawings: Drawing Information
Returns:
The current solid model.



voidSetCurrentSolid (pfcModel_ptr NewCurrentSolid)

Sets the current solid model for the drawing.

Before calling this method, the solid model must be assigned to the drawing using pfcModel2D::AddModel(pfcModel_ptr). To see changes to parameters and fields reflecting the change of the current solid model, regenerate the drawing using pfcSheetOwner::RegenerateSheet(xint)

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The solid is not included in the drawing.


Manual References:
Drawings: Drawing Operations, Drawings: Drawing Operations
Parameters:
NewCurrentSolid
The solid model to be made current.
Returns:



optional pfcModels_ptrListModels ()

Lists the models used in the drawing.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - No drawing models were found


Manual References:
Drawings: Drawing Information, Drawings: Drawing Information
Returns:
Sequence of models used in the drawing, or null, if no models are used.



voidAddModel (pfcModel_ptr NewModel)

Adds a solid model to the drawing.

Exceptions thrown (but not limited to):

pfcXToolkitInUse - The function did nothing because the specified model already exists.


Manual References:
Drawings: Drawing Operations, Drawings: Drawing Operations
Parameters:
NewModel
The model to add.
Returns:



voidDeleteModel (pfcModel_ptr Model)

Removes a model from the drawing.

The model cannot appear in any drawing views.

Exceptions thrown (but not limited to):

pfcXToolkitBadContext - The function did nothing because the model is NULL.

pfcXToolkitNotFound - The function failed because the specified model is not in the drawing.

pfcXToolkitInUse - The function failed because the specified model is referenced by a view.


Manual References:
Drawings: Drawing Operations, Drawings: Drawing Operations
Parameters:
Model
The model to remove.
Returns:



voidRegenerate ()

Regenerates the drawing draft entities.

If the model is a layout, this regenerates the layout and its relations.

Exceptions thrown (but not limited to):

pfcXToolkitInvalidType - Model is not a notebook


Manual References:
Drawings: Drawing Operations, Drawings: Drawing Operations
Returns:



voidReplaceModel (pfcModel_ptr FromModel, pfcModel_ptr ToModel, xbool Unrepresent)

Replaces a drawing model solid with another solid. The old and new solids must be members of the same family table.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The 'from' model is not in the drawing.

pfcXToolkitFound - The 'to' model is already in the drawing.

pfcXToolkitBadContext - unrepresent_ok was FALSE, but the "from" solid had a simplified view. OR 'from' and 'to' solids were not from the same family table.


See Also:
pfcModel2D::AddModel(pfcModel_ptr), pfcModel2D::ListModels(), pfcModel2D::DeleteModel(pfcModel_ptr)
Manual References:
Drawings: Drawing Operations, Drawings: Drawing Operations
Parameters:
FromModel
The model to be replaced.
ToModel
The model to use as the replacement.
Unrepresent
true to unrepresent any simplified views of the old model in the drawing, false to fail if the old model has one or more simplified views in the drawing.
Returns:



pfcDimension2D_ptrCreateDrawingDimension (pfcDrawingDimCreateInstructions_ptr Instructions)
DEPRECATED: since Creo 4
SUCCESSOR(S): pfcModel2D::CreateRefDimension, pfcModel2D::CreateDimension


Creates a new drawing dimension.

Exceptions thrown (but not limited to):

pfcXToolkitBadDimAttach - a dimension could not be created with the attachments and sense specified.


Manual References:
Drawings: Drawing Operations, Drawings: Drawing Operations, Drawings: Creating Drawing Dimensions, Drawings: Creating Drawing Dimensions
Parameters:
Instructions
Data object containing information needed to place the dimension.
Returns:
The created dimension.



pfcDimension2Ds_ptrListShownDimensions (pfcModel_ptr Model, optional pfcModelItemType Type)
DEPRECATED: since Creo 4
SUCCESSOR(S): pfcModel2D::CollectShownRefDimensions, pfcModel2D::CollectShownDimensions


Lists the solid-model owned dimensions and reference dimensions shown in the drawing.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - No model dimensions were visited.


Parameters:
Model
The model which owns the dimensions.
Type
The type of dimension to find, or null to find normal and reference dimensions.
Returns:
The list of dimensions and reference dimensions.



pfcDimension_ptrCreateDimension (pfcDimensionAttachments_ptr Attachments, pfcDimSenses_ptr Senses, pfcDimOrientationHint hint, pfcPoint2D_ptr Location)

 

Exceptions thrown (but not limited to):

pfcXToolkitBadDimAttach - a dimension could not be created with the attachments and sense specified.


Parameters:
Attachments
 
Senses
 
hint
 
Location
 
Returns:
 



pfcDimension_ptrCreateRefDimension (pfcDimensionAttachments_ptr Attachments, pfcDimSenses_ptr Senses, pfcDimOrientationHint hint, pfcPoint2D_ptr Location)

 

Exceptions thrown (but not limited to):

pfcXToolkitBadDimAttach - a dimension could not be created with the attachments and sense specified.


Parameters:
Attachments
 
Senses
 
hint
 
Location
 
Returns:
 



optional pfcDimensions_ptrCollectShownDimensions (pfcSolid_ptr SolidMdl)

 

Exceptions thrown (but not limited to):

pfcXToolkitNoLicense - License check failure.

pfcXToolkitNotFound - No model dimensions were visited.


Parameters:
SolidMdl
 
Returns:
 



optional pfcDimensions_ptrCollectShownRefDimensions (pfcSolid_ptr SolidMdl)

 

Exceptions thrown (but not limited to):

pfcXToolkitNoLicense - License check failure.

pfcXToolkitNotFound - No model dimensions were visited.


Parameters:
SolidMdl
 
Returns:
 



optional pfcSimpReps_ptrListSimplifiedReps (pfcModel_ptr Solid)

Returns a list of the simplified representations referenced by the drawing.
See Also:
pfcModel2D::ListModels(), pfcModel2D::AddSimplifiedRep(pfcSimpRep_ptr), pfcModel2D::AddModel(pfcModel_ptr), pfcModel2D::DeleteSimplifiedRep(pfcSimpRep_ptr), pfcModel2D::DeleteModel(pfcModel_ptr)
Manual References:
Drawings: Drawing Information, Drawings: Drawing Information
Parameters:
Solid
The solid model owner of the simplified representations.
Returns:
Sequence of simplified representations found, or null, if no representations were found.



voidAddSimplifiedRep (pfcSimpRep_ptr SimplifiedRep)

Adds a new simplified representation of a model to a drawing.

Allows the creation of views displaying the simplified rep.

Exceptions thrown (but not limited to):

pfcXToolkitFound - The function did nothing because the specified simplified representation already exists.


See Also:
pfcModel2D::AddModel(pfcModel_ptr), pfcModel2D::ListSimplifiedReps(pfcModel_ptr), pfcModel2D::ListModels(), pfcModel2D::DeleteSimplifiedRep(pfcSimpRep_ptr), pfcModel2D::DeleteModel(pfcModel_ptr)
Manual References:
Drawings: Drawing Operations, Drawings: Drawing Operations
Parameters:
SimplifiedRep
The simplfied representation to add to the drawing.
Returns:



voidDeleteSimplifiedRep (pfcSimpRep_ptr SimplifiedRep)

Deletes a simplified representation of a model from a drawing.

Exceptions thrown (but not limited to):

pfcXToolkitBadContext - The function did nothing because the simplified representation is null.

pfcXToolkitNotFound - The function failed because the specified simplified representation is not in the drawing.

pfcXToolkitInUse - The function failed because the specified model and simplified representation are referenced by another view in the drawing.


See Also:
pfcModel2D::DeleteModel(pfcModel_ptr), pfcModel2D::ListSimplifiedReps(pfcModel_ptr), pfcModel2D::ListModels(), pfcModel2D::AddSimplifiedRep(pfcSimpRep_ptr), pfcModel2D::AddModel(pfcModel_ptr)
Manual References:
Drawings: Drawing Operations, Drawings: Drawing Operations
Parameters:
SimplifiedRep
The simplfied representation to delete from the drawing.
Returns: