Library | Package Java Toolkit

Interface Model2D

package com.ptc.pfc.pfcModel2D;

public interface Model2D
  extends com.ptc.pfc.pfcSheet.SheetOwner,
          com.ptc.pfc.pfcDetail.DetailItemOwner,
          com.ptc.pfc.pfcTable.TableOwner,
          com.ptc.pfc.pfcModel.Model



Description

This interface represents a two-dimensional Creo Parametric model.
See Also:
BaseSession.ListModels(), BaseSession.GetModel(String, ModelType), BaseSession.GetModelFromDescr(ModelDescriptor), BaseSession.CreateDrawingFromTemplate(String, String, ModelDescriptor, DrawingCreateOptions), BaseSession.Import2DModel(String, ModelType, String, Import2DInstructions), Drawing, Report, Layout
Direct Known Subclasses:
Drawing, Report, Layout, WModel2D



Method Summary
voidAddModel (Model NewModel)
    Adds a solid model to the drawing.
voidAddSimplifiedRep (SimpRep SimplifiedRep)
    Adds a new simplified representation of a model to a drawing.
/*optional*/ DimensionsCollectShownDimensions (Solid SolidMdl)
     
/*optional*/ DimensionsCollectShownRefDimensions (Solid SolidMdl)
     
DimensionCreateDimension (DimensionAttachments Attachments, DimSenses Senses, DimOrientationHint hint, Point2D Location)
     
Dimension2DCreateDrawingDimension (DrawingDimCreateInstructions Instructions)
DEPRECATED: since Creo 4
SUCCESSOR(S): Model2D.CreateRefDimension, Model2D.CreateDimension

    Creates a new drawing dimension.
DimensionCreateRefDimension (DimensionAttachments Attachments, DimSenses Senses, DimOrientationHint hint, Point2D Location)
     
View2DCreateView (View2DCreateInstructions Instructions)
    Creates a new view in the drawing.
voidDeleteModel (Model Model)
    Removes a model from the drawing.
voidDeleteSimplifiedRep (SimpRep SimplifiedRep)
    Deletes a simplified representation of a model from a drawing.
/*optional*/ ModelGetCurrentSolid ()
    Gets the current solid model of the drawing
doubleGetTextHeight ()
    Get method for attribute "TextHeight"
    The text height of the model. The model must be in the current window inorderto access this property.
/*optional*/ View2DGetViewByName (String ViewName)
    Returns a drawing view, given its name.
/*optional*/ View2DGetViewDisplaying (BaseDimension Dim)
    Returns the drawing view that displays a dimension.
View2DsList2DViews ()
    Lists the drawing views.
/*optional*/ ModelsListModels ()
    Lists the models used in the drawing.
Dimension2DsListShownDimensions (Model Model, /*optional*/ ModelItemType Type)
DEPRECATED: since Creo 4
SUCCESSOR(S): Model2D.CollectShownRefDimensions, Model2D.CollectShownDimensions

    Lists the solid-model owned dimensions and reference dimensions shown in the drawing.
/*optional*/ SimpRepsListSimplifiedReps (Model Solid)
    Returns a list of the simplified representations referenced by the drawing.
voidRegenerate ()
    Regenerates the drawing draft entities.
voidReplaceModel (Model FromModel, Model ToModel, boolean Unrepresent)
    Replaces a drawing model solid with another solid. The old and new solids must be members of the same family table.
voidSetCurrentSolid (Model NewCurrentSolid)
    Sets the current solid model for the drawing.
voidSetTextHeight (double value)
    Set method for attribute "TextHeight"
    The text height of the model. The model must be in the current window inorderto access this property.
voidSetViewDisplaying (BaseDimension Dim, View2D NewView)
    Sets the view that shows the model dimension.

Methods Inherited from Interface com.ptc.pfc.pfcSheet.SheetOwner
GetNumberOfSheets, GetCurrentSheetNumber, SetCurrentSheetNumber, AddSheet, ReorderSheet, GetSheetData, GetSheetInfo, GetSheetTransform, RegenerateSheet, DeleteSheet, GetSheetScale, SetSheetScale, GetSheetFormat, SetSheetFormat, GetSheetBackgroundView, GetSheetUnits, GetSheetFormatDescr

Methods Inherited from Interface com.ptc.pfc.pfcDetail.DetailItemOwner
ListDetailItems, GetDetailItem, CreateDetailItem, CreateFreeNote, CreateOffsetNote, CreateOnItemNote, CreateLeaderNote, RetrieveSymbolDefinition, RetrieveSymbolDefItem, AllowReadonlyNoteSelection

Methods Inherited from Interface com.ptc.pfc.pfcTable.TableOwner
ListTables, GetTable, CreateTable, RetrieveTable, RetrieveTableByOrigin, UpdateTables, DeleteTable

Methods Inherited from Interface com.ptc.pfc.pfcObject.Parent
GetChild

Methods Inherited from Interface com.ptc.pfc.pfcModelItem.ModelItemOwner
GetItemByName, GetItemById, ListItems

Methods Inherited from Interface com.ptc.pfc.pfcView.ViewOwner
RetrieveView, GetView, SaveView, GetCurrentViewTransform, SetCurrentViewTransform, CurrentViewRotate, ListViews, GetCurrentView

Methods Inherited from Interface com.ptc.pfc.pfcObject.Child
GetDBParent, GetOId

Methods Inherited from Interface com.ptc.pfc.pfcBase.ActionSource
AddActionListener, RemoveActionListener, AddActionListenerWithType

Methods Inherited from Interface com.ptc.pfc.pfcModelItem.RelationOwner
DeleteRelations, GetRelations, SetRelations, RegenerateRelations, EvaluateExpression

Methods Inherited from Interface com.ptc.pfc.pfcModelItem.ParameterOwner
GetParam, CreateParam, ListParams, SelectParam, CreateParamWithUnits, SelectParameters

Methods Inherited from Interface com.ptc.pfc.pfcModel.Model
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

GetTextHeight/SetTextHeight

doubleGetTextHeight ()
voidSetTextHeight (double 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



List2DViews

View2DsList2DViews ()


    Lists the drawing views.

Exceptions thrown (but not limited to):

XToolkitNotFound - 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 SheetOwner.GetSheetBackgroundView(int).


GetViewByName

/*optional*/ View2DGetViewByName (String 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.


GetViewDisplaying

/*optional*/ View2DGetViewDisplaying (BaseDimension Dim)


    Returns the drawing view that displays a dimension.

Works for solid and drawing dimensions.

Exceptions thrown (but not limited to):

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


CreateView

View2DCreateView (View2DCreateInstructions Instructions)


    Creates a new view in the drawing.

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

Exceptions thrown (but not limited to):

XToolkitCreateViewBadSheet - The specified sheet does not exist.

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

XToolkitCreateViewBadExplode - The function cannot explode the view model.

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


See Also:
GeneralViewCreateInstructions, ProjectionViewCreateInstructions
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.


SetViewDisplaying

voidSetViewDisplaying (BaseDimension Dim, View2D 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):

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


GetCurrentSolid

/*optional*/ ModelGetCurrentSolid ()


    Gets the current solid model of the drawing

Exceptions thrown (but not limited to):

XToolkitNotFound - No current model is assigned to the drawing.


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


SetCurrentSolid

voidSetCurrentSolid (Model NewCurrentSolid)


    Sets the current solid model for the drawing.

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

Exceptions thrown (but not limited to):

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


ListModels

/*optional*/ ModelsListModels ()


    Lists the models used in the drawing.

Exceptions thrown (but not limited to):

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


AddModel

voidAddModel (Model NewModel)


    Adds a solid model to the drawing.

Exceptions thrown (but not limited to):

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


DeleteModel

voidDeleteModel (Model Model)


    Removes a model from the drawing.

The model cannot appear in any drawing views.

Exceptions thrown (but not limited to):

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

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

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


Regenerate

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

XToolkitInvalidType - Model is not a notebook


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


ReplaceModel

voidReplaceModel (Model FromModel, Model ToModel, boolean 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):

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

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

XToolkitBadContext - 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:
Model2D.AddModel(Model), Model2D.ListModels(), Model2D.DeleteModel(Model)
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:


CreateDrawingDimension

Dimension2DCreateDrawingDimension (DrawingDimCreateInstructions Instructions)

DEPRECATED: since Creo 4
SUCCESSOR(S): Model2D.CreateRefDimension, Model2D.CreateDimension


    Creates a new drawing dimension.

Exceptions thrown (but not limited to):

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


ListShownDimensions

Dimension2DsListShownDimensions (Model Model, /*optional*/ ModelItemType Type)

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

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


CreateDimension

DimensionCreateDimension (DimensionAttachments Attachments, DimSenses Senses, DimOrientationHint hint, Point2D Location)


     

Exceptions thrown (but not limited to):

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


Parameters:
Attachments
 
Senses
 
hint
 
Location
 
Returns:
 


CreateRefDimension

DimensionCreateRefDimension (DimensionAttachments Attachments, DimSenses Senses, DimOrientationHint hint, Point2D Location)


     

Exceptions thrown (but not limited to):

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


Parameters:
Attachments
 
Senses
 
hint
 
Location
 
Returns:
 


CollectShownDimensions

/*optional*/ DimensionsCollectShownDimensions (Solid SolidMdl)


     

Exceptions thrown (but not limited to):

XToolkitNoLicense - License check failure.

XToolkitNotFound - No model dimensions were visited.


Parameters:
SolidMdl
 
Returns:
 


CollectShownRefDimensions

/*optional*/ DimensionsCollectShownRefDimensions (Solid SolidMdl)


     

Exceptions thrown (but not limited to):

XToolkitNoLicense - License check failure.

XToolkitNotFound - No model dimensions were visited.


Parameters:
SolidMdl
 
Returns:
 


ListSimplifiedReps

/*optional*/ SimpRepsListSimplifiedReps (Model Solid)


    Returns a list of the simplified representations referenced by the drawing.
See Also:
Model2D.ListModels(), Model2D.AddSimplifiedRep(SimpRep), Model2D.AddModel(Model), Model2D.DeleteSimplifiedRep(SimpRep), Model2D.DeleteModel(Model)
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.


AddSimplifiedRep

voidAddSimplifiedRep (SimpRep 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):

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


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


DeleteSimplifiedRep

voidDeleteSimplifiedRep (SimpRep SimplifiedRep)


    Deletes a simplified representation of a model from a drawing.

Exceptions thrown (but not limited to):

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

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

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


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