Library | Module

Interface IpfcModel2D



Description

This interface represents a two-dimensional Creo Parametric model.
See Also:
IpfcBaseSession.ListModels(), IpfcBaseSession.GetModel(), IpfcBaseSession.GetModelFromDescr(), IpfcBaseSession.CreateDrawingFromTemplate(), IpfcBaseSession.Import2DModel(), IpfcDrawing, IpfcReport, IpfcLayout
Direct Parent Classes:
IpfcSheetOwner, IpfcDetailItemOwner, IpfcTableOwner, IpfcModel
Direct Known Subclasses:
IpfcDrawing, IpfcReport, IpfcLayout



Property Summary

PropertyTextHeightas Double
The text height of the model. The model must be in the current window inorderto access this property.



Method Summary

SubAddModel (NewModel as IpfcModel)
Adds a solid model to the drawing.
SubAddSimplifiedRep (SimplifiedRep as IpfcSimpRep)
Adds a new simplified representation of a model to a drawing.
FunctionCollectShownDimensions (SolidMdl as IpfcSolid) as IpfcDimensions [optional]
 
FunctionCollectShownRefDimensions (SolidMdl as IpfcSolid) as IpfcDimensions [optional]
 
FunctionCreateDimension (Attachments as IpfcDimensionAttachments, Senses as IpfcDimSenses, hint as IpfcDimOrientationHint, Location as IpfcPoint2D) as IpfcDimension
 
FunctionCreateDrawingDimension (Instructions as IpfcDrawingDimCreateInstructions) as IpfcDimension2D
DEPRECATED: since Creo 4
SUCCESSOR(S): Model2D.CreateRefDimension, Model2D.CreateDimension
Creates a new drawing dimension.
FunctionCreateRefDimension (Attachments as IpfcDimensionAttachments, Senses as IpfcDimSenses, hint as IpfcDimOrientationHint, Location as IpfcPoint2D) as IpfcDimension
 
FunctionCreateView (Instructions as IpfcView2DCreateInstructions) as IpfcView2D
Creates a new view in the drawing.
SubDeleteModel (Model as IpfcModel)
Removes a model from the drawing.
SubDeleteSimplifiedRep (SimplifiedRep as IpfcSimpRep)
Deletes a simplified representation of a model from a drawing.
FunctionGetCurrentSolid () as IpfcModel [optional]
Gets the current solid model of the drawing
FunctionGetViewByName (ViewName as String) as IpfcView2D [optional]
Returns a drawing view, given its name.
FunctionGetViewDisplaying (Dim as IpfcBaseDimension) as IpfcView2D [optional]
Returns the drawing view that displays a dimension.
FunctionList2DViews () as IpfcView2Ds
Lists the drawing views.
FunctionListModels () as IpfcModels [optional]
Lists the models used in the drawing.
FunctionListShownDimensions (Model as IpfcModel, Type as IpfcModelItemType [optional]) as IpfcDimension2Ds
DEPRECATED: since Creo 4
SUCCESSOR(S): Model2D.CollectShownRefDimensions, Model2D.CollectShownDimensions
Lists the solid-model owned dimensions and reference dimensions shown in the drawing.
FunctionListSimplifiedReps (Solid as IpfcModel) as IpfcSimpReps [optional]
Returns a list of the simplified representations referenced by the drawing.
SubRegenerate ()
Regenerates the drawing draft entities.
SubReplaceModel (FromModel as IpfcModel, ToModel as IpfcModel, Unrepresent as Boolean)
Replaces a drawing model solid with another solid. The old and new solids must be members of the same family table.
SubSetCurrentSolid (NewCurrentSolid as IpfcModel)
Sets the current solid model for the drawing.
SubSetViewDisplaying (Dim as IpfcBaseDimension, NewView as IpfcView2D)
Sets the view that shows the model dimension.



Property Detail


PropertyTextHeightas Double

The text height of the model. The model must be in the current window inorderto access this property.





Method Detail


SubAddModel (NewModel as IpfcModel)

Adds a solid model to the drawing.

Exceptions thrown (but not limited to):

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


Parameters:
NewModel
The model to add.



SubAddSimplifiedRep (SimplifiedRep as IpfcSimpRep)

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):

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


See Also:
IpfcModel2D.AddModel(), IpfcModel2D.ListSimplifiedReps(), IpfcModel2D.ListModels(), IpfcModel2D.DeleteSimplifiedRep(), IpfcModel2D.DeleteModel()
Parameters:
SimplifiedRep
The simplfied representation to add to the drawing.



FunctionCollectShownDimensions (SolidMdl as IpfcSolid) as IpfcDimensions [optional]

 

Exceptions thrown (but not limited to):

IpfcXToolkitNoLicense - License check failure.

IpfcXToolkitNotFound - No model dimensions were visited.


Parameters:
SolidMdl
 
Returns:
 



FunctionCollectShownRefDimensions (SolidMdl as IpfcSolid) as IpfcDimensions [optional]

 

Exceptions thrown (but not limited to):

IpfcXToolkitNoLicense - License check failure.

IpfcXToolkitNotFound - No model dimensions were visited.


Parameters:
SolidMdl
 
Returns:
 



FunctionCreateDimension (Attachments as IpfcDimensionAttachments, Senses as IpfcDimSenses, hint as IpfcDimOrientationHint, Location as IpfcPoint2D) as IpfcDimension

 

Exceptions thrown (but not limited to):

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


Parameters:
Attachments
 
Senses
 
hint
 
Location
 
Returns:
 



FunctionCreateDrawingDimension (Instructions as IpfcDrawingDimCreateInstructions) as IpfcDimension2D
DEPRECATED: since Creo 4
SUCCESSOR(S): Model2D.CreateRefDimension, Model2D.CreateDimension

Creates a new drawing dimension.

Exceptions thrown (but not limited to):

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


Parameters:
Instructions
Data object containing information needed to place the dimension.
Returns:
The created dimension.



FunctionCreateRefDimension (Attachments as IpfcDimensionAttachments, Senses as IpfcDimSenses, hint as IpfcDimOrientationHint, Location as IpfcPoint2D) as IpfcDimension

 

Exceptions thrown (but not limited to):

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


Parameters:
Attachments
 
Senses
 
hint
 
Location
 
Returns:
 



FunctionCreateView (Instructions as IpfcView2DCreateInstructions) as IpfcView2D

Creates a new view in the drawing.

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

Exceptions thrown (but not limited to):

IpfcXToolkitCreateViewBadSheet - The specified sheet does not exist.

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

IpfcXToolkitCreateViewBadExplode - The function cannot explode the view model.

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


See Also:
IpfcGeneralViewCreateInstructions, IpfcProjectionViewCreateInstructions
Parameters:
Instructions
Data object containing details about how to create the view.
Returns:
The newly created drawing view.



SubDeleteModel (Model as IpfcModel)

Removes a model from the drawing.

The model cannot appear in any drawing views.

Exceptions thrown (but not limited to):

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

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

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


Parameters:
Model
The model to remove.



SubDeleteSimplifiedRep (SimplifiedRep as IpfcSimpRep)

Deletes a simplified representation of a model from a drawing.

Exceptions thrown (but not limited to):

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

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

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


See Also:
IpfcModel2D.DeleteModel(), IpfcModel2D.ListSimplifiedReps(), IpfcModel2D.ListModels(), IpfcModel2D.AddSimplifiedRep(), IpfcModel2D.AddModel()
Parameters:
SimplifiedRep
The simplfied representation to delete from the drawing.



FunctionGetCurrentSolid () as IpfcModel [optional]

Gets the current solid model of the drawing

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - No current model is assigned to the drawing.


Returns:
The current solid model.



FunctionGetViewByName (ViewName as String) as IpfcView2D [optional]

Returns a drawing view, given its name.
Parameters:
ViewName
The name of the drawing view.
Returns:
The drawing view, or null, if the view does not exist.



FunctionGetViewDisplaying (Dim as IpfcBaseDimension) as IpfcView2D [optional]

Returns the drawing view that displays a dimension.

Works for solid and drawing dimensions.

Exceptions thrown (but not limited to):

IpfcXToolkitNotDisplayed - The dimension is not displayed in the drawing.


Parameters:
Dim
The dimension object.
Returns:
The view where the dimension is displayed, or null, if the dimension is not displayed in the drawing.



FunctionList2DViews () as IpfcView2Ds

Lists the drawing views.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - No views were found


Returns:
The drawing views found. This does not include the drawing sheet background view(s), returned by IpfcSheetOwner.GetSheetBackgroundView().



FunctionListModels () as IpfcModels [optional]

Lists the models used in the drawing.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - No drawing models were found


Returns:
Sequence of models used in the drawing, or null, if no models are used.



FunctionListShownDimensions (Model as IpfcModel, Type as IpfcModelItemType [optional]) as IpfcDimension2Ds
DEPRECATED: since Creo 4
SUCCESSOR(S): Model2D.CollectShownRefDimensions, Model2D.CollectShownDimensions

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

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - 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.



FunctionListSimplifiedReps (Solid as IpfcModel) as IpfcSimpReps [optional]

Returns a list of the simplified representations referenced by the drawing.
See Also:
IpfcModel2D.ListModels(), IpfcModel2D.AddSimplifiedRep(), IpfcModel2D.AddModel(), IpfcModel2D.DeleteSimplifiedRep(), IpfcModel2D.DeleteModel()
Parameters:
Solid
The solid model owner of the simplified representations.
Returns:
Sequence of simplified representations found, or null, if no representations were found.



SubRegenerate ()

Regenerates the drawing draft entities.

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

Exceptions thrown (but not limited to):

IpfcXToolkitInvalidType - Model is not a notebook





SubReplaceModel (FromModel as IpfcModel, ToModel as IpfcModel, Unrepresent as Boolean)

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):

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

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

IpfcXToolkitBadContext - 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:
IpfcModel2D.AddModel(), IpfcModel2D.ListModels(), IpfcModel2D.DeleteModel()
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.



SubSetCurrentSolid (NewCurrentSolid as IpfcModel)

Sets the current solid model for the drawing.

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

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The solid is not included in the drawing.


Parameters:
NewCurrentSolid
The solid model to be made current.



SubSetViewDisplaying (Dim as IpfcBaseDimension, NewView as IpfcView2D)

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):

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


Parameters:
Dim
The model dimension.
NewView
The view in which to show this dimension.