Drawings
This section describes how to program drawing functions using Creo Object TOOLKIT C++.
Overview of Drawings in Creo Object TOOLKIT C++
This section describes the functions that deal with drawings. You can create drawings of all Creo models using the functions in Creo Object TOOLKIT C++. You can annotate the drawing, manipulate dimensions, and use layers to manage the display of different items.
Unless otherwise specified, Creo Object TOOLKIT C++ functions that operate on drawings use world units.
Creating Drawings from Templates
Drawing templates simplify the process of creating a drawing using Creo Object TOOLKIT C++. Creo can create views, set the view display, create snap lines, and show the model dimensions based on the template. Use templates to:
•  Define layout views
•  Set view display
•  Place notes
•  Place symbols
•  Define tables
•  Show dimensions
Method Introduced:
Use the method pfcBaseSession::CreateDrawingFromTemplate to create a drawing from the drawing template and to return the created drawing. The attributes are:
•  New drawing name
•  Name of an existing template
•  Name and type of the solid model to use while populating template views
•  Sequence of options to create the drawing. The options are as follows:
  pfcDRAWINGCREATE_DISPLAY_DRAWING—display the new drawing.
  pfcDRAWINGCREATE_SHOW_ERROR_DIALOG—display the error dialog box.
  pfcDRAWINGCREATE_WRITE_ERROR_FILE—write the errors to a file.
  pfcDRAWINGCREATE_PROMPT_UNKNOWN_PARAMS—prompt the user on encountering unknown parameters
Drawing Creation Errors
Methods Introduced:
The exception pfcXToolkitDrawingCreateErrors is thrown if an error is encountered when creating a drawing from a template. This exception contains a list of errors which occurred during drawing creation.
Note
When this exception type is encountered, the drawing is actually created, but some of the contents failed to generate correctly.
The error structure contains an array of drawing creation errors. Each error message may have the following elements:
•  Type—The type of error as follows:
  pfcDWGCREATE_ERR_SAVED_VIEW_DOESNT_EXIST—Saved view does not exist.
  pfcDWGCREATE_ERR_X_SEC_DOESNT_EXIST—Specified cross section does not exist.
  pfcDWGCREATE_ERR_EXPLODE_DOESNT_EXIST—Exploded state did not exist.
  pfcDWGCREATE_ERR_MODEL_NOT_EXPLODABLE—Model cannot be exploded.
  pfcDWGCREATE_ERR_SEC_NOT_PERP—Cross section view not perpendicular to the given view.
  pfcDWGCREATE_ERR_NO_RPT_REGIONS—Repeat regions not available.
  pfcDWGCREATE_ERR_FIRST_REGION_USED—Repeat region was unable to use the region specified.
  pfcDWGCREATE_ERR_NOT_PROCESS_ASSEM— Model is not a process assembly view.
  pfcDWGCREATE_ERR_NO_STEP_NUM—The process step number does not exist.
  pfcDWGCREATE_ERR_TEMPLATE_USED—The template does not exist.
  pfcDWGCREATE_ERR_NO_PARENT_VIEW_FOR_PROJ—There is no possible parent view for this projected view.
  pfcDWGCREATE_ERR_CANT_GET_PROJ_PARENT—Could not get the projected parent for a drawing view.
  pfcDWGCREATE_ERR_SEC_NOT_PARALLEL—The designated cross section was not parallel to the created view.
  pfcDWGCREATE_ERR_SIMP_REP_DOESNT_EXIST—The designated simplified representation does not exist.
•  ViewName—Name of the view where the error occurred.
•  SheetNumber—Sheet number where the error occurred.
•  ObjectName—Name of the invalid or missing object.
•  View—2D view in which the error occurred.
Use the method pfcXToolkitDrawingCreateErrors::GetErrors to obtain the preceding array elements from the error object.
Obtaining Drawing Models
This section describes how to obtain drawing models.
Methods Introduced:
The method pfcBaseSession::RetrieveModel retrieves the drawing specified by the model descriptor. Model descriptors are data objects used to describe a model file and its location in the system. The method returns the retrieved drawing.
The method pfcBaseSession::GetModel returns a drawing based on its name and type, whereas pfcBaseSession::GetModelFromDescr returns a drawing specified by the model descriptor. The model must be in session.
Use the method pfcBaseSession::ListModels to return a sequence of all the drawings in session.
Drawing Information
Methods Introduced:
The method pfcModel2D::ListModels returns a list of all the solid models used in the drawing.
The method pfcModel2D::GetCurrentSolid returns the current solid model of the drawing.
The method pfcModel2D::ListSimplifiedReps returns the simplified representations of a solid model that are assigned to the drawing.
The method pfcModel2D::GetTextHeight returns the text height of the drawing.
Access Drawing Location in Grid
Method introduced:
Use the methods wfcWModel2D::GetLocationGridColumnFromPosition and wfcWModel2D::GetLocationGridRowFromPosition to find the grid coordinates of a location in the drawing. This method returns strings representing the row and column containing the point. The method specifies the position of a point, expressed in screen coordinates. This method returns strings representing the row and column containing the point.
Drawing Tree
Methods introduced:
Use the method wfcWModel2D::CollapseTree to collapse all nodes of the drawing tree in the Creo Parametric window and make its child nodes invisible. The input argument WindowId returns the Id of the window which contains the drawing. Use -1 to expand the drawing tree in the active window.
Use the method wfcWModel2D::ExpandTree to expand the drawing tree in the Creo Parametric window and make all drawing sheets and drawing items in the active drawing sheet visible.
Use the method wfcWModel2D::RefreshTree to rebuild the drawing tree in the Creo Parametric window that contains the drawing. You can use this function after adding a single drawing item or multiple drawing items to a drawing.
Note
Specify the input argument WindowId as -1 to refresh, expand, or collapse the drawing tree in the active window.
Drawing Operations
Methods Introduced:
The method pfcModel2D::AddModel adds a new solid model to the drawing.
The method pfcModel2D::DeleteModel removes a model from the drawing. The model to be deleted should not appear in any of the drawing views.
The method pfcModel2D::ReplaceModel replaces a model in the drawing with a related model (the relationship should be by family table or interchange assembly). It allows you to replace models that are shown in drawing views and regenerates the view.
The method pfcModel2D::SetCurrentSolid assigns the current solid model for the drawing. Before calling this method, the solid model must be assigned to the drawing using the method pfcModel2D::AddModel. To see the changes to parameters and fields reflecting the change of the current solid model, regenerate the drawing using the method pfcSheetOwner::RegenerateSheet.
The method pfcModel2D::AddSimplifiedRep associates the drawing with the simplified representation of an assembly.
The method pfcModel2D::DeleteSimplifiedRep removes the association of the drawing with an assembly simplified representation. The simplified representation to be deleted should not appear in any of the drawing views.
Use the method pfcModel2D::Regenerate to regenerate the drawing draft entities and appearance.
The method pfcModel2D::SetTextHeight ets the value of the text height of the drawing.
The method pfcModel2D::CreateDrawingDimension creates a new drawing dimension based on the data object that contains information about the location of the dimension. This method returns the created dimension. Refer to the section Drawing Dimensions.
The method pfcModel2D::CreateView creates a new drawing view based on the data object that contains information about how to create the view. The method returns the created drawing view. Refer to the section Creating Drawing Views.
Merge Drawings
You can merge two drawings to enhance the performance and management of large drawings. Individual Creo Parametric users can work in parallel and then merge their separate drawings into a single drawing file.
Methods Introduced:
Use the method wfcWDrawing::Merge to merge two drawings.
Drawing Sheets
A drawing sheet is represented by its number. Drawing sheets in Creo Object TOOLKIT C++ are identified by the same sheet numbers seen by a Creo user.
Note
These identifiers may change if the sheets are moved as a consequence of adding, removing or reordering sheets.
Drawing Sheet Information
Methods Introduced:
Superseded Method:
The method wfcWDrawing::GetSheetName retrieves the name of the specified drawing sheet.
The method pfcSheetOwner::GetSheetTransform returns the transformation matrix for the sheet specified by the sheet number. This transformation matrix includes the scaling needed to convert screen coordinates to drawing coordinates (which use the designated drawing units).
The method pfcSheetOwner::GetSheetData and the interface pfcSheetData have been deprecated. Use the method pfcSheetOwner::GetSheetInfo and the interface pfcSheetInfo instead.
The method pfcSheetOwner::GetSheetInfo returns sheet data including the size, orientation, and units of the sheet specified by the sheet number.
The method pfcSheetOwner::GetSheetScale returns the scale of the drawing on a particular sheet based on the drawing model used to measure the scale. If no models are used in the drawing then the default scale value is 1.0.
The method pfcSheetOwner::GetSheetFormat returns the drawing format used for the sheet specified by the sheet number. It returns a null value if no format is assigned to the sheet.
The method pfcSheetOwner::GetSheetFormatDescr returns the model descriptor of the drawing format used for the specified drawing sheet.
drawing format for a specified drawing and sheet number within the drawing . A drawing format file can have two sheets defining two formats. You can create drawings using either of the sheets as drawing format. If such a drawing format file is used to create the drawing, the method wfcWDrawing::GetFormatSheet retrieves the sheet number of the drawing format which was used to create the specified drawing.
The method pfcSheetOwner::GetSheetBackgroundView returns the view object representing the background view of the sheet specified by the sheet number.
The method pfcSheetOwner::GetNumberOfSheets returns the number of sheets in the model.
The method pfcSheetOwner::GetCurrentSheetNumber returns the current sheet number in the model.
Note
The sheet numbers range from 1 to n, where n is the number of sheets.
The method pfcSheetOwner::GetSheetUnits returns the units used by the sheet specified by the sheet number.
Drawing Sheet Operations
Methods Introduced:
The method pfcSheetOwner::AddSheet adds a new sheet to the model and returns the number of the new sheet.
The method pfcSheetOwner::DeleteSheet removes the sheet specified by the sheet number from the model.
Use the method pfcSheetOwner::ReorderSheet to reorder the sheet from a specified sheet number to a new sheet number.
Note
The sheet number of other affected sheets also changes due to reordering or deletion.
The method pfcSheetOwner::RegenerateSheet regenerates the sheet specified by the sheet number.
Note
You can regenerate a sheet only if it is displayed.
Use the method pfcSheetOwner::SetSheetScale to set the scale of a model on the sheet based on the drawing model to scale and the scale to be used. Pass the value of the DrawingModel parameter as null to select the current drawing model.
Use the method pfcSheetOwner::SetSheetFormat to apply the specified format to a drawing sheet based on the drawing format, sheet number of the format, and the drawing model.
The sheet number of the format is specified by the FormatSheetNumber parameter. This number ranges from 1 to the number of sheets in the format. Pass the value of this parameter as null to use the first format sheet.
The drawing model is specified by the DrawingModel parameter. Pass the value of this parameter as null to select the current drawing model.
The method pfcSheetOwner::SetCurrentSheetNumber sets the current sheet to the sheet number specified.
The method wfcWModel2D::CopyDrawingSheet creates a copy of a specified drawing sheet. Specify the sheet number of the sheet to be copied in the input argument sheet. Set it to a value less than 1 to create a copy of the currently selected sheet.
Use the method wfcWModel2D::ShowSheetFormat to display or hide the drawing format for a specified drawing sheet. The input arguments are:
•  show—Specifies if the drawing format must be displayed. Pass true to display the drawing format.
•  sheet—Specifies the sheet number of the sheet. Set it to a value less than 1 to display or hide the drawing format of the currently selected sheet.
The method wfcWModel2D::IsSheetFormatBlanked checks if the drawing format of a specified drawing sheet is blank. In case of the current sheet, set the input argument sheet to a value less than 1.
The method wfcWModel2D::IsSheetFormatShown checks if the drawing format of a specified drawing sheet is shown. The output argument sheet returns the value as True, if the drawing format is shown and returns the value as False, if the drawing format is not shown.
The method wfcWModel2D::GetToleranceStandard returns the tolerance standard that is assigned to the specified drawing.
Use the method wfcWModel2D::SetToleranceStandard to set the tolerance standard for a drawing.
The method wfcWModel2D::CreateLeaderWithArrowTypeNote enables you to create a note with a leader and the specified arrow type in a specified drawing. The input arguments are:
•  TextLines—Specifies the text lines using the pfcDetailTextLines object.
•  NoteAttach—Specifies the details of the attachment of the note using the pfcAttachment object.
•  LeaderAttachs—Specifies the leaders attached to the note using the pfcDetailLeaderAttachments object.
•  Types—Specifies the types of arrowheads used for leaders attached to the note using the wfcLeaderArrowTypes object.
Drawing Format Files
The format of a drawing refers to the boundary lines, referencing marks and graphic elements that appear on every sheet before any drawing elements are shown or added. These usually include items such as tables for the company name, detailers name, revision number and date. In a Creo Parametric drawing, you can associate a format file (.frm) with the drawing. This file carries all the format graphical information, and it can also carry some optional default attributes like text size and draft scale. The functions described in this section allow you to get and set the size of the drawing format.
The methods wfcWModel2D::GetFormatSize and wfcWModel2D::SetFormatSize retrieve and set the size of the drawing format in the specified drawing as awfcModel.FormatSizeData object. You can add a standard or customize size format in the drawing.
Use the method wfcFormatSizeData::Create to create a drawing format in a specified drawing. The input arguments are:
•  PaperSize—Specifies the size of the drawing using the enumerated data type pfcPlotPaperSize.
•  Width—Specifies the width of the drawing in inches, when PaperSize is set to pfcVARIABLESIZEPLOT.
It specifies the width of the drawing in millimeters, when size is set to pfcVARIABLESIZE_IN_MM_PLOT.
Note
This argument is ignored for all the other sizes of the drawing except pfcVARIABLESIZEPLOT and pfcVARIABLESIZE_IN_MM_PLOT.
•  Height—Specifies the height of the drawing in inches, when the size is set to pfcVARIABLESIZEPLOT.
The methods wfcFormatSizeData::GetPaperSize and wfcFormatSizeData::SetPaperSize get and set the size of the drawing using the enumerated data type pfcModel.PlotPaperSize.
The methods wfcFormatSizeData::GetWidth and wfcFormatSizeData::SetWidth get and set the width of the drawing.
The methods wfcFormatSizeData::GetHeight and wfcFormatSizeData::SetHeight get and set the height of the drawing.
Drawing Views
A drawing view is represented by the interface pfcView2D. All model views in the drawing are associative, that is, if you change a dimensional value in one view, the system updates other drawing views accordingly. The model automatically reflects any dimensional changes that you make to a drawing. In addition, corresponding drawings also reflect any changes that you make to a model such as the addition or deletion of features and dimensional changes.
Creating Drawing Views
Method Introduced:
The method pfcModel2D::CreateView reates a new view in the drawing. Before calling this method, the drawing must be displayed in a window.
The interface pfcView2DCreateInstructions contains details on how to create the view. The types of drawing views supported for creation are:
•  pfcDRAWVIEW_GENERAL—General drawing views
•  pfcDRAWVIEW_PROJECTION—Projected drawing views
General Drawing Views
The interface pfcGeneralViewCreateInstructions contains details on how to create general drawing views.
Methods Introduced:
The method pfcGeneralViewCreateInstructions::Create creates the pfcGeneralViewCreateInstructions object used for creating general drawing views.
Use the method pfcGeneralViewCreateInstructions::SetViewModel to assign the solid model to display in the created general drawing view.
Use the method pfcGeneralViewCreateInstructions::SetLocation to assign the location in a drawing sheet to place the created general drawing view.
Use the method pfcGeneralViewCreateInstructions::SetSheetNumber to set the number of the drawing sheet in which the general drawing view is created.
The method pfcGeneralViewCreateInstructions::SetOrientation assigns the orientation of the model in the general drawing view in the form of the pfcTransform3D data object. The transformation matrix must only consist of the rotation to be applied to the model. It must not consist of any displacement or scale components. If necessary, set the displacement to {0, 0, 0} using the method pfcTransform3D::SetOrigin, and remove any scaling factor by normalizing the matrix.
Use the method pfcGeneralViewCreateInstructions::SetExploded to set the created general drawing view to be an exploded view.
Use the method pfcGeneralViewCreateInstructions::SetScale to assign a scale to the created general drawing view. This value is optional, if not assigned, the default drawing scale is used.
The methods pfcGeneralViewCreateInstructions::GetViewScale and pfcGeneralViewCreateInstructions::SetViewScale get and set a scale to the created general drawing view. This value is optional, if not assigned, the default drawing scale is used.
Projected Drawing Views
The interface pfcProjectionViewCreateInstructions contains details on how to create general drawing views.
Methods Introduced:
The method pfcProjectionViewCreateInstructions::Create creates the pfcProjectionViewCreateInstructions data object used for creating projected drawing views.
Use the method pfcProjectionViewCreateInstructions::SetParentView to assign the parent view for the projected drawing view.
Use the method pfcProjectionViewCreateInstructions::SetLocation to assign the location of the projected drawing view. This location determines how the drawing view will be oriented.
Use the method pfcProjectionViewCreateInstructions::SetExploded to set the created projected drawing view to be an exploded view.
Obtaining Drawing Views
Methods Introduced:
The method pfcSelection::GetSelView2D returns the selected drawing view (if the user selected an item from a drawing view). It returns a null value if the selection does not contain a drawing view.
The method pfcModel2D::List2DViews lists and returns the drawing views found. This method does not include the drawing sheet background views returned by the method pfcSheetOwner::GetSheetBackgroundView.
The method pfcModel2D::GetViewByName returns the drawing view based on the name. This method returns a null value if the specified view does not exist.
The method pfcModel2D::GetViewDisplaying returns the drawing view that displays a dimension. This method returns a null value if the dimension is not displayed in the drawing.
Note
This method works for solid and drawing dimensions.
The method pfcSheetOwner::GetSheetBackgroundView returns the drawing sheet background views.
Drawing View Information
Methods Introduced:
The inherited method pfcChild::GetDBParent, when called on a pfcView2D object, provides the drawing model which owns the specified drawing view. The return value of the method can be downcast to a pfcModel2D object.
Note
The method pfcChild::GetOId is reserved for internal use.
The method pfcView2D::GetSheetNumber returns the sheet number of the sheet that contains the drawing view.
The method pfcView2D::GetIsBackground returns a value that indicates whether the view is a background view or a model view.
The method pfcView2D::GetModel returns the solid model displayed in the drawing view.
The method pfcView2D::GetScale returns the scale of the drawing view.
The method pfcView2D::GetIsScaleUserdefined specifies if the drawing has a user-defined scale.
The method pfcView2D::GetOutline returns the position of the view in the sheet in world units.
The method pfcView2D::GetLayerDisplayStatus returns the display status of the specified layer in the drawing view.
The method pfcView2D::GetDisplay returns an output structure that describes the display settings of the drawing view. The fields in the structure are as follows:
•  Style—Whether to display as wireframe, hidden lines, no hidden lines, or shaded
•  TangentStyle—Linestyle used for tangent edges
•  CableStyle—Linestyle used to display cables
•  RemoveQuiltHiddenLines—Whether or not to apply hidden-line-removal to quilts
•  ShowConceptModel—Whether or not to display the skeleton
•  ShowWeldXSection—Whether or not to include welds in the cross-section
The method pfcView2D::GetTransform returns a matrix that describes the transform between 3D solid coordinates and 2D world units for that drawing view. The transformation matrix is a combination of the following factors:
•  The location of the view origin with respect to the drawing origin.
•  The scale of the view units with respect to the drawing units
•  The rotation of the model with respect to the drawing coordinate system.
The method pfcView2D::GetName returns the name of the specified view in the drawing.
The simplified representations of assembly and part can be used as drawing models to create general views. Use the method pfcView2D::GetSimpRep to retrieve the simplified representation for the specified view in the drawing.
Drawing View Display Information
Methods Introduced:
The method wfcDrawingViewDisplay::Create creates a new instance of the wfcDrawingViewDisplay object that contains information about the display styles being used in a view.
The methods wfcDrawingViewDisplay::GetCableDisp and wfcDrawingViewDisplay::SetCableDisp get and set the style used to display the cables. You can set the cable style using the object wfcCableDisplay:
•  wfcCABLEDISP_DEFAULT—Uses the display setting from Creo Parametric Options dialog box, under Entity Display, Cable display settings.
•  wfcCABLEDISP_CENTERLINE—Displays centerlines of cables and wires.
•  wfcCABLEDISP_THICK—Displays cables and wires as a thick lines.
•  wfcCableDisplay_nilNULL value.
In a view, you can define whether to show or hide the skeleton model. The methods wfcDrawingViewDisplay::GetConceptModel and wfcDrawingViewDisplay::SetConceptModel get and set the status of skeleton models. If you set the value as True, then the skeleton model is displayed.
The methods wfcDrawingViewDisplay::GetDispStyle and wfcDrawingViewDisplay::SetDispStyle get and set the display style of the model geometry. You can set the display style using the object pfcDisplayStyle:
•  pfcDISPSTYLE_DEFAULT—When you import drawings from Pro/ENGINEER Wildfire 2.0 or earlier releases that were saved with the Default option, this option is retained for these drawings. Once you update these drawings in Pro/ENGINEER Wildfire 3.0 and later releases, the wfcDISPSTYLE_DEFAULT option changes to wfcDISPSTYLE_FOLLOW_ENVIRONMENT.
•  pfcDISPSTYLE_WIREFRAME—Shows all edges in wireframe style.
•  pfcDISPSTYLE_HIDDEN_LINE—Shows all edges in hidden line style.
•  pfcDISPSTYLE_NO_HIDDEN—Removes all hidden edge from view display.
•  pfcDISPSTYLE_SHADED—Shows the view in shaded display mode.
•  pfcDISPSTYLE_FOLLOW_ENVIRONMENT—Uses the current configuration settings for display.
•  pfcDISPSTYLE_SHADED_WITH_EDGES—Shows the model as a shaded solid along with its edges.
You can remove the hidden lines in a quilt. The methods wfcDrawingViewDisplay::GetQuiltHLR and wfcDrawingViewDisplay::SetQuiltHLR get and set the hidden line removal property in quilts.
The methods wfcDrawingViewDisplay::GetTanEdgeDisplay and wfcDrawingViewDisplay::SetTanEdgeDisplay get and set the display style for tangent edges. You can set the tangent edge display style using the object wfcTangentEdgeDisplay:
•  wfcTANEDGE_DEFAULT—Uses the default settings.
•  wfcTANEDGE_NONE—Turns off the display of tangent edges
•  wfcTANEDGE_CENTERLINE—Displays tangent edges in centerline font.
•  wfcTANEDGE_PHANTOM—Displays tangent edges in phantom font.
•  wfcTANEDGE_DIMMED—Displays tangent edges in dimmed system color.
•  wfcTANEDGE_SOLID—Displays tangent edges as solid lines.
You can show and hide the weld cross-sections in a drawing. The methods wfcDrawingViewDisplay::GetWeldXSec and wfcDrawingViewDisplay::SetWeldXSec get and set the display of weld cross-sections in a drawing.
Drawing Views Operations
Methods Introduced:
The method pfcView2D::SetScale sets the scale of the drawing view.
The method pfcView2D::Translate moves the drawing view by the specified transformation vector.
The method pfcView2D::Delete deletes a specified drawing view. Set the DeleteChildren parameter to true to delete the children of the view. Set this parameter to false or null to prevent deletion of the view if it has children.
The method pfcView2D::Regenerate erases the displayed view of the current object, regenerates the view from the current drawing, and redisplays the view.
The method pfcView2D::SetLayerDisplayStatus sets the display status for the layer in the drawing view.
The method pfcView2D::SetDisplay sets the value of the display settings for the drawing view.
Drawing Dimensions
This section describes the methods that give access to the types of dimensions that can be created in the drawing mode. They do not apply to dimensions created in the solid mode, either those created automatically as a result of feature creation, or reference dimension created in a solid. A drawing dimension or a reference dimension shown in a drawing is represented by the interface pfcDimension2D.
Obtaining Drawing Dimensions
Methods Introduced:
The method pfcModelItemOwner::ListItems returns a list of drawing dimensions specified by the parameter Type or returns null if no drawing dimensions of the specified type are found. This method lists only those dimensions created in the drawing.
The values of the parameter Type for the drawing dimensions are:
•  pfcITEM_DIMENSION—Dimension
•  pfcITEM_REF_DIMENSION—Reference dimension
Set the parameter Type to the type of drawing dimension to retrieve. If this parameter is set to null, then all the dimensions in the drawing are listed.
The method pfcModelItemOwner::GetItemById returns a drawing dimension based on the type and the integer identifier. The method returns only those dimensions created in the drawing. It returns a null if a drawing dimension with the specified attributes is not found.
The method pfcSelection::GetSelItem returns the value of the selected drawing dimension.
Creating Drawing Dimensions
Methods Introduced:
The method pfcDrawingDimCreateInstructions::Create creates an instructions object that describes how to create a drawing dimension using the method pfcModel2D::CreateDrawingDimension.
The parameters of the instruction object are:
•  Attachments—The entities that the dimension is attached to. The selections should include the drawing model view.
•  IsRefDimension—True if the dimension is a reference dimension, otherwise null or false.
•  OrientationHint—Describes the orientation of the dimensions in cases where this cannot be deduced from the attachments themselves.
•  Senses—Gives more information about how the dimension attaches to the entity, i.e., to what part of the entity and in what direction the dimension runs. The types of dimension senses are as follows:
  pfcDIMSENSE_NONE
  pfcDIMSENSE_POINT
  pfcDIMSENSE_SPLINE_PT
  pfcDIMSENSE_TANGENT_INDEX
  pfcDIMSENSE_LINEAR_TO_ARC_OR_CIRCLE_TANGENT
  pfcDIMSENSE_ANGLE
  pfcDIMSENSE_POINT_TO_ANGLE
•  TextLocation—The location of the dimension text, in world units.
The method pfcModel2D::CreateDrawingDimension creates a dimension in the drawing based on the instructions data object that contains information needed to place the dimension. It takes as input an array of pfcSelection objects and an array of pfcDimensionSense structures that describe the required attachments. The method returns the created drawing dimension.
The method pfcEmptyDimensionSense::Create creates a new dimension sense associated with the type pfcDIMSENSE NONE. The sense field is set to Type In this case no information such as location or direction is needed to describe the attachment points. For example, if there is a single attachment which is a straight line, the dimension is the length of the straight line. If the attachments are two parallel lines, the dimension is the distance between them.
The method pfcPointDimensionSense::Create creates a new dimension sense associated with the type pfcDIMSENSE POINT which specifies the part of the entity to which the dimension is attached. The sense field is set to the value of the parameter PointType.
The possible values of PointType are:
•  pfcDIMPOINT_END1— The first end of the entity
•  pfcDIMPOINT_END2—The second end of the entity
•  pfcDIMPOINT_CENTER—The center of an arc or circle
•  pfcDIMPOINT_NONE—No information such as location or direction of the attachment is specified. This is similar to setting the PointType to pfcDIMSENSE NONE.
•  pfcDIMPOINT_MIDPOINT—The mid point of the entity
The method pfcSplinePointDimensionSense::Create creates a dimension sense associated with the type pfcDIMSENSE_SPLINE_PT. This means that the attachment is to a point on a spline. The sense field is set to SplinePointIndex i.e., the index of the spline point.
The method pfcTangentIndexDimensionSense::Create creates a new dimension sense associated with the type pfcDIMSENSE_TANGENT_INDEX. The attachment is to a tangent of the entity, which is an arc or a circle. The sense field is set to TangentIndex, i.e., the index of the tangent of the entity.
The method pfcLinAOCTangentDimensionSense::Create creates a new dimension sense associated with the type pfcDIMSENSE_LINEAR_TO_ARC_OR_CIRCLE_TANGENT. The dimension is the perpendicular distance between the a line and a tangent to an arc or a circle that is parallel to the line. The sense field is set to the value of the parameter TangentType.
The possible values of TangentType are:
•  pfcDIMLINAOCTANGENT_LEFT0—The tangent is to the left of the line, and is on the same side, of the center of the arc or circle, as the line.
•  pfcDIMLINAOCTANGENT_RIGHT0—The tangent is to the right of the line, and is on the same side, of the center of the arc or circle, as the line.
•  pfcDIMLINAOCTANGENT_LEFT1—The tangent is to the left of the line, and is on the opposite side of the line.
•  pfcDIMLINAOCTANGENT_RIGHT1— The tangent is to the right of the line, and is on the opposite side of the line.
The method pfcAngleDimensionSense::Create creates a new dimension sense associated with the type pfcDIMSENSE_ANGLE. The dimension is the angle between two straight entities. The sense field is set to the value of the parameter AngleOptions.
The possible values of AngleOptions are:
•  IsFirst—Is set to TRUE if the angle dimension starts from the specified entity in a counterclockwise direction. Is set to FALSE if the dimension ends at the specified entity. The value is TRUE for one entity and FALSE for the other entity forming the angle.
•  ShouldFlip—If the value of ShouldFlip is FALSE, and the direction of the specified entity is away from the vertex of the angle, then the dimension attaches directly to the entity. If the direction of the entity is away from the vertex of the angle, then the dimension is attached to the a witness line. The witness line is in line with the entity but in the direction opposite to the vertex of the angle. If the value of ShouldFlip is TRUE then the above cases are reversed.
The method pfcPointToAngleDimensionSense::Create creates a new dimension sense associated with the type pfcDIMSENSE_POINT_TO_ANGLE. The dimension is the angle between a line entity and the tangent to a curved entity. The curve attachment is of the type pfcDIMSENSE_POINT_TO_ANGLE and the line attachment is of the type DIMSENSE POINT. In this case both the angle and the angle_sense fields must be set. The field sense shows which end of the curve the dimension is attached to and the field angle_sense shows the direction in which the dimension rotates and to which side of the tangent it attaches.
Drawing Dimensions Information
Methods Introduced:
The method pfcDrawing::IsDimensionAssociative checks if the dimension or reference dimension is associative.
The method pfcDimension2D::GetIsReference determines whether the dimension is a reference dimension.
The method pfcDrawing::IsDimensionDisplayed checks if the dimension is displayed in the drawing or soild.
The method pfcDrawing::GetDimensionAttachPoints returns a sequence of attachment points for the dimension. The array of dimension senses returned by the method pfcDimension2D::GetDimensionSenses gives more information on how these attachments are interpreted. It gives information about how the dimension is attached to each attachment point of the model.
The method pfcDrawing::GetDimensionSenses returns a sequence of dimension senses, describing how the dimension is attached to each attachment returned by the method pfcDrawing::GetDimensionAttachPoints.
The method pfcDrawing::GetDimensionOrientHint returns the orientation of the dimensions in case where this cannot be deduced from the attachment themselves. The orientation of the dimensions is given by the enumerated type pfcDimOrientationHint. The orientation determines how Creo will orient the dimension with respect to the attachment points.
Note
This methods described above are applicable only for dimensions created in the drawing or the solid mode. It does not support dimensions created at intersection points of entities.
The method pfcDrawing::GetBaselineDimension returns an ordinate baseline dimension. It returns a null value if the dimension is not an ordinate dimension.
Note
The method updates the display of the dimension only if it is currently displayed.
The method pfcDrawing::GetDimensionLocation returns the placement location of the dimension.
The method pfcDrawing::GetDimensionView returns the drawing view in which the dimension is displayed. For dimensions created in drawing mode and owned by a solid, which can be displayed only in the context of that drawing, the method returns the drawing view. The method returns NULL if the dimension is not attached to a drawing view.
The method pfcDimension2D::GetTolerance retrieves the upper and lower tolerance limits of the drawing dimension in the form of the pfcDimTolerance object. A null value indicates a nominal tolerance.
The method pfcDrawing::IsDimensionToleranceDisplayed checks if the dimension tolerance is displayed in the drawing or solid.
The method wfcWDrawing::GetDimensionPath extracts the component path for a dimension displayed in a drawing.
The method wfcWDrawing::GetDualDimensionOptions retrieves information about the various options of dual dimensioning in a drawing as a wfcDualDimensionGlobalOptions object.
Use the method wfcDualDimensionGlobalOptions::GetDualDimensionType to get the display style of dual dimensions. The display type is given by the enumerated type wfcDualDimensionDisplayType. The valid values are:
•  wfcSECONDARY_DIM_DISPLAY_OFF— Turns off display of dual dimension.
•  wfcSECONDARY_DIM_DISPLAY_TOP—Displays the secondary dimension on top of the primary dimension. The primary dimension is displayed in brackets.
•  wfcSECONDARY_DIM_DISPLAY_BOTTOM— Displays the secondary dimension below the primary dimension. The secondary dimension is displayed in brackets.
•  wfcSECONDARY_DIM_DISPLAY_LEFT— Displays the secondary dimension to the left of the primary dimension. The primary dimension is displayed in brackets.
•  wfcSECONDARY_DIM_DISPLAY_RIGHT— Displays the secondary dimension to the right of the primary dimension. The secondary dimension is displayed in brackets.
•  wfcSECONDARY_DIM_DISPLAY_ONLY— Displays only the secondary dimension.
Use the method wfcDualDimensionGlobalOptions::GetSecondaryUnit to retrieve the type of units used for the secondary dimension.
The method wfcDualDimensionGlobalOptions::GetDigitsDifference retrieves the number of decimal places that a secondary dimension contains as compared to the primary dimension in a dual dimension.
The method wfcDualDimensionGlobalOptions::AreBracketsAllowed checks if one of the dimensions of a dual dimension is displayed in brackets.
Drawing Dimensions Operations
Methods Introduced:
The method pfcDrawing::ConvertOrdinateDimensionToLinear converts an ordinate dimension to a linear dimension. The drawing or solid containing the dimension must be displayed.
The method pfcDrawing::ConvertLinearDimensionToOrdinate converts a linear dimension to an ordinate baseline dimension.
The method pfcDimension2D::SetLocation sets the placement location of a dimension or reference dimension in a drawing or solid.
The method pfcDrawing::SwitchDimensionView changes the view where a dimension created in the drawing or solid is displayed.
The method pfcDrawing::EraseDimension permanently erases the dimension from the drawing or solid.
The method pfcModel2D::SetViewDisplaying changes the view where a dimension created in a solid model is displayed.
Ordinate Dimensions
Methods Introduced:
The method wfcWSolid::CreateOrdinateDimension creates a new model ordinate driven dimension or a model ordinate reference dimension in a solid model. It requires the input of a reference baseline annotation as well as a geometry reference. The annotation plane for the new dimension will be inherited from the baseline. Once the reference dimension is created, use the method wfcAnnotation::ShowInDrawing to display it.
Drawing Tables
A drawing table in Creo Object TOOLKIT C++ is represented by the interface pfcTable. It is a child of the pfcModelItem interface.
Some drawing table methods operate on specific rows or columns. The row and column numbers in Creo Object TOOLKIT C++ begin with 1 and range up to the total number of rows or columns in the table. Some drawing table methods operate on specific table cells. The interface pfcTableCell is used to represent a drawing table cell.
Creating Drawing Cells
Method Introduced:
The method pfcTableCell::Create creates the pfcTableCell object representing a cell in the drawing table.
Some drawing table methods operate on specific drawing segment. A multisegmented drawing table contains 2 or more areas in the drawing. Inserting or deleting rows in one segment of the table can affect the contents of other segments. Table segments are numbered beginning with 0. If the table has only a single segment, use 0 as the segment id in the relevant methods.
Selecting Drawing Tables and Cells
Methods Introduced:
Tables may be selected using the method pfcBaseSession::Select. Pass the filter dwg_table to select an entire table and the filter table_cell to prompt the user to select a particular table cell.
The method pfcSelection::GetSelItem returns the selected table handle. It is a model item that can be cast to a pfcTable object.
The method pfcSelection::GetSelTableCell returns the row and column indices of the selected table cell.
The method pfcSelection::GetSelTableSegment returns the table segment identifier for the selected table cell. If the table consists of a single segment, this method returns the identifier 0.
Creating Drawing Tables
Methods Introduced:
The method pfcTableCreateInstructions::Create creates the pfcTableCreateInstructions data object that describes how to construct a new table using the method pfcTableOwner::CreateTable.
The parameters of the instructions data object are:
•  Origin—This parameter stores a three dimensional point specifying the location of the table origin. The origin is the position of the top left corner of the table.
•  RowHeights—Specifies the height of each row of the table.
•  ColumnData—Specifies the width of each column of the table and its justification.
•  SizeTypes—Indicates the scale used to measure the column width and row height of the table.
The method pfcTableOwner::CreateTable creates a table in the drawing specified by the pfcTableCreateInstructions data object.
Retrieving Drawing Tables
Methods Introduced
The method pfcTableRetrieveInstructions::Create creates the pfcTableRetrieveInstructions data object that describes how to retrieve a drawing table using the methods pfcTableOwner::RetrieveTable and pfcTableOwner::RetrieveTableByOrigin. The method returns the created instructions data object.
The parameters of the instruction object are:
•  FileName—Name of the file containing the drawing table.
•  Position—Coordinates of the point on the drawing sheet, where the retrieved table must be placed. You must specify the value in screen coordinates.
You can also set the parameters for pfcTableRetrieveInstructions data object using the following methods:
•  pfcTableRetrieveInstructions::SetFileName—Sets the name of the drawing table. You must not specify the extension.
•  pfcTableRetrieveInstructions::SetPath—Sets the path to the drawing table file. The path must be specified relative to the working directory.
•  pfcTableRetrieveInstructions::SetVersion—Sets the version of the drawing table that must be retrieved. If you specify NULL rthe latest version of the drawing table is retrieved.
•  pfcTableRetrieveInstructions::SetPosition—Sets the coordinates of the point on the drawing sheet, where the table must be placed. You must specify the value in screen coordinates.
•  pfcTableRetrieveInstructions::SetReferenceSolid—Sets the model from which data must be copied into the drawing table. If this argument is passed as NULL, an empty table is created.
•  pfcTableRetrieveInstructions::SetReferenceRep—Sets the handle to the simplified representation in a solid, from which data must be copied into the drawing table. If this argument is passed as NULL, and the argument solid is not NULL, then data from the solid model is copied into the drawing table
The method pfcTableOwner::RetrieveTable retrieves a table specified by the pfcTableRetrieveInstructions data object from a file on the disk. It returns the retrieved table. The upper-left corner of the table is placed on the drawing sheet at the position specified by the pfcTableRetrieveInstructions data object.
The method pfcTableOwner::RetrieveTableByOrigin also retrieves a table specified by the pfcTableRetrieveInstructions data object from a file on the disk. The origin of the table is placed on the drawing sheet at the position specified by the pfcTableRetrieveInstructions data object. Tables can be created with different origins by specifying the option Direction, in the Insert Table dialog box.
Drawing Tables Information
Methods Introduced:
The method pfcTableOwner::ListTables returns a sequence of tables found in the model.
The method pfcTableOwner::GetTable returns a table specified by the table identifier in the model. It returns a null value if the table is not found.
The method pfcTable::GetRowCount returns the number of rows in the table.
The method pfcTable::GetColumnCount returns the number of columns in the table.
The method pfcTable::CheckIfIsFromFormat checks if the drawing table was created using the format. The method returns a true value if the table was created by applying the drawing format.
The method pfcTable::GetRowSize returns the height of the drawing table row specified by the segment identifier and the row number.
The method pfcTable::GetColumnSize returns the width of the drawing table column specified by the segment identifier and the column number.
The method pfcTable::GetText returns the sequence of text in a drawing table cell. Set the value of the parameter Mode to pfcDWGTABLE_NORMAL to get the text as displayed on the screen. Set it to pfcDWGTABLE_FULL to get symbolic text, which includes the names of parameter references in the table text.
The method pfcTable::GetCellNote returns the detail note item contained in the table cell.
Drawing Tables Operations
Methods Introduced:
The method pfcTable::Erase erases the specified table temporarily from the display. It still exists in the drawing. The erased table can be displayed again using the method pfcTable::Display. The table will also be redisplayed by a window repaint or a regeneration of the drawing. Use these methods to hide a table from the display while you are making multiple changes to the table.
The method pfcTable::RotateClockwise rotates a table clockwise by the specified amount of rotation.
The method pfcTable::InsertRow inserts a new row in the drawing table. Set the value of the parameter RowHeight to specify the height of the row. Set the value of the parameter InsertAfterRow to specify the row number after which the new row has to be inserted. Specify 0 to insert a new first row.
The method pfcTable::InsertColumn inserts a new column in the drawing table. Set the value of the parameter ColumnWidth to specify the width of the column. Set the value of the parameter InsertAfterColumn to specify the column number after which the new column has to be inserted. Specify 0 to insert a new first column.
The method pfcTable::MergeRegion merges table cells within a specified range of rows and columns to form a single cell. The range is a rectangular region specified by the table cell on the upper left of the region and the table cell on the lower right of the region.
The method pfcTable::SubdivideRegion removes merges from a region of table cells that were previously merged. The region to remove merges is specified by the table cell on the upper left of the region and the table cell on the lower right of the region.
The methods pfcTable::DeleteRow and pfcTable::DeleteColumn delete any specified row or column from the table. The methods also remove the text from the affected cells.
The method pfcTable::SetText sets text in the table cell.
Use the method pfcTableOwner::DeleteTable to delete a specified drawing table from the model permanently. The deleted table cannot be displayed again.
Note
Many of the above methods provide a parameter Repaint If this is set to true the table will be repainted after the change. If set to false or null Creo will delay the repaint, allowing you to perform several operations before showing changes on the screen.
The method wfcWTable::WrapCelltext wraps the text in a cell.
The method wfcWTable::GetGrowthDirection and wfcWTable::SetGrowthDirection get and set the growth direction of the table using the enumerated type wfcTableGrowthDirType.
The valid values for growth direction are defined in the enumerated data type wfcTableGrowthDirType:
•  wfcTABLEGROWTHDIR_DOWNRIGHT
•  wfcTABLEGROWTHDIR_DOWNLEFT
•  wfcTABLEGROWTHDIR_UPRIGHT
•  wfcTABLEGROWTHDIR_UPRIGHT
The method wfcWTable::Save saves a drawing table in different formats. The formats given by the enumerated type wfcTableFormatType can be of the following types:
•  TABLEFORMAT_TBL—Specifies the tabular format.
•  TABLEFORMAT_TBL—Specifies the tabular format.
•  TABLEFORMAT_CSV—Specifies the CSV format.
The methods wfcWTable::SetColumnWidth and wfcWTable::SetRowHeight assign the width of a specified column and the height of a specified row depending upon the size of the drawing table. The drawing table size given by the enumerated data type pfcTableSizeType and the valid values are:
•  pfcTABLESIZE_BY_NUM_CHARS—Specifies the size in characters. If the specified value for width of a column or height of a row is a fraction, pfcTABLESIZE_BY_NUM_CHARS rounds down the fractional value to the nearest whole number.
•  pfcTABLESIZE_BY_LENGTH—Specifies the size in screen coordinates.
The methods wfcWTable::GetRowHeightAutoAdjustType and wfcWTable::SetRowHeightAutoAdjustType get and set the automatic row height adjustment property for a row of a drawing table. The type of height adjustment property is defined in the enumerated type wfcTableRowheightAutoadjustType:
•  wfcTBLROWHEIGHT_AUTOADJUST_FALSE— Specifies that the automatic row height adjustment property is not set.
•  wfcTBLROWHEIGHT_AUTOADJUST_TRUE— Specifies that the automatic row height adjustment property is set.
•  wfcTBLROWHEIGHT_AUTOADJUST_TRUE_LEGACY— Specifies a pre-Creo Parametric 1.0 release behavior. In this behavior, sometimes the row height may be automatically adjusting and sometimes may not be automatically adjusting. To set an explicit row adjustment status use the method wfcWTable::SetRowHeightAutoAdjustType.
Drawing Table Segments
Drawing tables can be constructed with one or more segments. Each segment can be independently placed. The segments are specified by an integer identifier starting with 0.
Methods Introduced:
The method pfcSelection::GetSelTableSegment returns the value of the segment identifier of the selected table segment. It returns a null value if the selection does not contain a segment identifier.
The method pfcTable::GetSegmentCount returns the number of segments in the table.
The method pfcTable::GetSegmentSheet determines the sheet number that contains a specified drawing table segment.
The method pfcTable::MoveSegment moves a drawing table segment to a new location. Pass the co-ordinates of the target position in the format x, y, z=0.
Note
Set the value of the parameter Repaint to true to repaint the drawing with the changes. Set it to false or null to delay the repaint.
To get information about a drawing table pass the value of the segment identifier as input to the method pfcTable::GetInfo. The method returns the table information including the rotation, row and column information, and the 3D outline.
Use the method wfcWTable::SetSegmentOrigin to assign the origin for a specified drawing table segment.
The method wfcWTable::GetSegmentExtents returns the start and end rows and columns of a specified table segment. The input argument SegmentId is the table segment ID. Pass the value as -1 if you are referring to the only segment of a one-segment table.
The methods wfcSegmentExtents::GetFirstColumn and wfcSegmentExtents::GetFirstRow returns the first row and first column of a table segment.
The methods wfcSegmentExtents::GetLastColumn and wfcSegmentExtents::GetLastRow returns the last row and last column of a table segment.
Repeat Regions
Methods Introduced:
The methods pfcTable::IsCommentCell, pfcTable::GetCellComponentModel, pfcTable::GetCellReferenceModel, pfcTable::GetCellTopModel, and pfcTableOwner::UpdateTables apply to repeat regions in drawing tables.
The method pfcTable::IsCommentCell tells you whether a cell in a repeat region contains a comment.
The method pfcTable::GetCellComponentModel returns the path to the assembly component model that is being referenced by a cell in a repeat region of a drawing table. It does not return a valid path if the cell attribute is set to NO DUPLICATE or NO DUPLICATE/LEVEL.
The method pfcTable::GetCellReferenceModel returns the reference component that is being referred to by a cell in a repeat region of a drawing table, even if cell attribute is set to NO DUPLICATE or NO DUPLICATE/LEVEL.
The method pfcTable::GetCellTopModel returns the top model that is being referred to by a cell in a repeat region of a drawing table, even if cell attribute is set to NO DUPLICATE or NO DUPLICATE/LEVEL.
Use the method pfcTableOwner::UpdateTables to update the repeat regions in all the tables to account for changes to the model. It is equivalent to the command Table, Repeat Region, Update.
Drawing Views And Models
Listing Drawing Views
Methods Introduced:
The method wfcWView2D::GetParentView retrieves the parent view of a specified drawing view.
The method wfcWView2D::GetChildren retrieves the child views of a drawing view.
The method wfcWView2D::GetProjectionArrow checks if the projection arrow flag has been set for a projected or detailed drawing view.
The method wfcWView2D::GetPerspectiveScaleEyePointDistance retrieves the eye-point distance from model space for the perspective scale applied to a drawing view. This scale option is available only for general views.
The method wfcWView2D::GetPerspectiveScaleViewDiameter specifies the view diameter in paper units such as mm for the perspective scale applied to a drawing view. This scale option is available only for general views.
The method wfcWView2D::GetColorSource retrieves information about color designation of the drawing view using the enumerated type wfcDrawingViewColorSource. The valid values are:
•  wfcVIEW_MODEL_COLOR—Specifies that the drawing colors are determined by the model settings.
•  wfcVIEW_DRAWING_COLOR—Specifies that the drawing colors are determined by the drawing settings.
The method wfcWView2D::GetZClippingReference retrieves the reference of the Z-clipping on the drawing view. The reference can be an edge, datum, or point on the surface that is parallel to the view. Geometry contained in the Z-clipping plane and in front of the plane appears, but geometry behind the plane does not appear. The system clips geometry that intersects the plane.
The method wfcWView2D::GetViewType retrieves the type of a specified drawing view using the enumerated data type wfcViewType. A drawing view can be of the following types:
•  wfcVIEW_GENERAL—Specifies a general drawing view.
•  wfcVIEW_PROJECTION—Specifies a projected drawing view.
•  wfcVIEW_AUXILIARY—Specifies an auxiliary drawing view.
•  wfcVIEW_DETAIL—Specifies a detailed drawing view.
•  wfcVIEW_REVOLVE—Specifies a revolved drawing view.
•  wfcVIEW_COPY_AND_ALIGN—Specifies a copy and align drawing view.
•  wfcVIEW_OF_FLAT_TYPE—Specifies a flat type drawing view.
The method wfcWView2D::GetViewId retrieves the ID of the drawing view.
The method wfcWView2D::IsErased checks if the drawing view is erased or not. When you erase a view, it is removed from display in the drawing. The view is not deleted from the drawing.
The methods wfcWView2D::GetAlignmentInstructions and wfcWView2D::SetAlignmentInstructions retrieve and set the alignment of a drawing view with respect to a reference view as a wfcViewAlignmentInstructions object.
The method wfcViewAlignmentInstructions::Create creates a data object that contains information about view alignment.
The methods wfcViewAlignmentInstructions::GetReferenceView and wfcViewAlignmentInstructions::SetReferenceView retrieve and set the reference view to which the drawing view is aligned.
The methods wfcViewAlignmentInstructions::GetAlignmentStyle and wfcViewAlignmentInstructions::SetAlignmentStyle get and set the alignment style using the enumerated type wfcDrawingViewAlignStyle. The valid values are:
•  wfcVIEW_ALIGN_HORIZONTAL—Specifies a horizontal alignment for the view. The drawing view and the reference view lie on the same horizontal line.
•  wfcVIEW_ALIGN_VERTICAL—Specifies a vertical alignment for the view. In case of vertical alignment, the drawing view and the view are aligned to lie on the same vertical line.
The methods wfcViewAlignmentInstructions::GetViewReference and wfcViewAlignmentInstructions::SetViewReference get and set the geometry, such as an edge, on the reference view. The view is aligned along this geometry. If no geometry is specified, the reference view is aligned according to its view origin.
The methods wfcViewAlignmentInstructions::GetAlignedViewReference and wfcViewAlignmentInstructions::SetAlignedViewReference get and set the geometry, such as an edge, on the drawing view. If no geometry is specified, the drawing view is aligned according to its view origin.
The method wfcWView2D::GetOriginSelectionRef retrieves the selection reference as a pfcSelection object for the drawing view.
The method wfcWView2D::GetOrigin retrieves the location of the origin as a pfcPoint3D object for the drawing view.
The method wfcWView2D::GetDatumDisplayStatus checks if a solid model datum has been explicitly shown in a particular drawing view using the enumerated type wfcViewItemdisplayStatus. The valid values are:
•  wfcVIEWDISP_NOT_SHOWN—Specifies that the solid model has never been shown in a particular drawing.
•  wfcVIEWDISP_SHOWN—Specifies that the solid model has been shown in a particular drawing.
•  wfcVIEWDISP_ERASED—Specifies that the solid model has been erased in a particular drawing.
The method wfcWView2D::GetPipingDisplay retrieves the piping display option for a drawing view using the enumerated type wfcPipingDisplay. The valid values are:
•  wfcPIPINGDISP_DEFAULT—Displays the default appearance of pipes for the piping assembly.
•  wfcPIPINGDISP_CENTERLINE—Displays pipes as centerlines without insulation.
•  wfcPIPINGDISP_THICK_PIPES—Displays thick pipes without insulation.
•  wfcPIPINGDISP_THICK_PIPES_AND_INSULATION—Displays thick pipes and insulation.
The method wfcWView2D::GetErasedViewSheet retrieves the sheet number which contained the view that was erased. If the sheet that contained the erased view is deleted, an exception is thrown.
The method wfcWDrawing::NeedsRegen checks whether the drawing or the specified drawing view needs to be regenerated.
The method wfcWDrawing::GetDrawingView retrieves the drawing view handle for the specified view ID.
The method wfcWSession::OpenDrawingAsReadOnly opens a drawing in the view only mode.
Modifying Views
Methods Introduced:
The method wfcWView2D::SetViewAsProjection assigns the specified drawing view as a projection.
The method wfcWView2D::SetProjectionArrow sets the projection arrow flag to true for a projected or detailed drawing view.
The method wfcWView2D::SetZClippingReference sets the Z-clipping on the drawing view to reference a given edge, datum, or point on the surface that is parallel to the view. Geometry contained in the Z-clipping plane and in front of the plane appears, but geometry behind the plane does not appear. The system clips geometry that intersects the plane.
The method wfcWView2D::Erase removes the specified drawing view from display. To display the view back in the drawing, use the method wfcWView2D::Resume.
The method wfcWView2D::SetOrigin assigns the location of the origin as a pfcPoint3D object and the selection reference for a specified drawing view as a pfcSelection object. Both the input arguments OriginLocation and Reference are optional. However, to set the origin successfully, you must pass a valid value to either of the input arguments. If you pass both the input arguments as Null, the method throws an exception pfcXToolkitBadInputs.
The method wfcWView2D::SetPipingDisplay assigns the piping display option for a drawing view using the enumerated data type wfcPipingDisplay.
Detailed Views
Methods Introduced:
A detailed view is a small portion of a model shown enlarged in another view.
The method wfcWDrawing::CreateDetailView creates a detailed view given the reference point on the parent view, the spline curve data, and location of the new view. A note with the detailed view name and the spline curve border are included in the parent view for the created detailed view. The input arguments are:
•  Instructions— Specifies a wfcDetailViewInstructions object which contains all the information needed to create a detailed view.
•  Location— Specifies the centerpoint of the view as a pfcPoint3D object.
Use the methods wfcWView2D::GetDetailViewInstructions and wfcWView2D::SetDetailViewInstructions to get and set the information related to detailed views as a wfcDetailViewInstructions object.
The method wfcDetailViewInstructions::Create creates a data object that contains information about the detailed view.
Use the methods wfcDetailViewInstructions::GetReference and wfcDetailViewInstructions::SetReference to get and set the reference point on the parent view for a specified detailed view.
Use the methods wfcDetailViewInstructions::GetCurveData and wfcDetailViewInstructions::SetCurveData to get and set the spline curve data as a pfcCurveDescriptor object for the specified detailed view. The information about the curve geometry is returned using the enumerated data type pfcCurveType. The curve data specifies the following:
•  The X and Y coordinate directions match the screen space.
•  The coordinate point (0,0) maps to the reference point.
•  The scaling unit is of one inch relative to the top model of the view. If two points in the spline are at a distance of '1' from each other, then in the actual view, the points will be one inch distant from each other, if measured in the scale of the top model. For example, if one of the points in the spline definition has coordinates (0.5, 0.0, 0.0), then the position of that point is not half an inch to the right of the reference point on the paper. Instead, when projected as a point in the space of the top model of the view, it is half an inch to the right of the reference point when measured in the space of that model.
The methods wfcDetailViewInstructions::GetBoundaryType and wfcDetailViewInstructions::SetBoundaryType get and set the boundary type for a detailed view in terms of the enumerated type wfcViewDetailBoundaryType. The types of boundaries are:
•  wfcDETAIL_BOUNDARY_CIRCLE—Draws a circle in the parent view.
•  wfcDETAIL_BOUNDARY_ELLIPSE—Draws an ellipse in the parent view.
•  wfcDETAIL_BOUNDARY_HORZ_VER_ELLIPSE—Draws an ellipse with horizontal or vertical major axis.
•  wfcDETAIL_BOUNDARY_SPLINE—Displays the spline boundary drawn by the user in the parent view.
•  wfcDETAIL_BOUNDARY_ASME_CIRCLE—Displays an ASME standard compliant circle as an arc with arrows and the detailed view name.
The method wfcDetailViewInstructions::ShowBoundary displays the boundary of the detailed view in the parent view.
The method wfcDetailViewInstructions::IsBoundaryShown checks if the boundary of the detailed view is displayed in the parent view.
Auxiliary Views
Methods Introduced:
An auxiliary view is a type of projected view that projects at right angles to a selected surface or axis. The selected surface or axis in the parent view must be perpendicular to the plane of the screen.
The method wfcWDrawing::CreateAuxiliaryView creates an auxiliary view. Pass the information required to create the auxiliary view as a wfcAuxiliaryViewInstructions object.
The method wfcWView2D::GetAuxiliaryViewInstructions retrieves information about the auxiliary view as a wfcAuxiliaryViewInstructions object.
The method wfcAuxiliaryViewInstructions::Create creates a data object that contains information about the auxiliary view.
The methods wfcAuxiliaryViewInstructions::GetReference and wfcAuxiliaryViewInstructions::SetReference retrieve and set the selection reference for the auxiliary view as a pfcSelection object.
The methods wfcAuxiliaryViewInstructions::GetLocation and wfcAuxiliaryViewInstructions::SetLocation retrieve and set the centerpoint of the auxiliary view as a pfcPoint3D object. By default, the origin of a drawing view is in the center of its outline. You can reset the origin of a drawing view by parametrically referencing model geometry or defining a location on the drawing sheet.
The method wfcWView2D::SetViewAsAuxiliary sets a specified drawing view as the auxiliary view.
Revolved Views
Methods Introduced:
A revolved view is a cross section of an existing view, revolved 90 degrees around a cutting plane projection.
The method wfcWDrawing::CreateRevolveView creates a revolved view given a cross section, the selection reference, and the point location. Pass the information required to create the auxiliary view as a wfcRevolveViewInstructions object.
The method wfcWView2D::GetRevolveViewInstructions retrieves information about the revolved view as a wfcRevolveViewInstructions object.
The method wfcRevolveViewInstructions::Create creates a data object that contains information about the revolved view.
The methods wfcRevolveViewInstructions::GetReference and wfcRevolveViewInstructions::SetReference retrieve and set the selection reference for the revolved view as a pfcSelection object.
The methods wfcRevolveViewInstructions::GetXSec and wfcRevolveViewInstructions::SetXSec retrieve and set the cross section of the revolved view as a pfcXSection object.
The methods wfcRevolveViewInstructions::GetLocation and wfcRevolveViewInstructions::SetLocation retrieve and set the centerpoint of the revolved view as a pfcPoint3D object. By default, the origin of a drawing view is in the center of its outline. You can reset the origin of a drawing view by parametrically referencing model geometry or defining a location on the drawing sheet.
View Orientation
Methods Introduced:
Note
The drawing view must be displayed before applying any orientation to it.
The method wfcWView2D::SetOrientation orients the specified drawing view using saved views from the model. The input arguments are:
•  MdlView—Specifies the name of the saved view in the model.
•  Orientation—Specifies the orientation of the view using the enumerated data type wfcDrawingViewOrientationType. The view types are:
  wfcVIEW_ORIENTATION_ISOMETRIC—Sets the view orientation to isometric.
  wfcVIEW_ORIENTATION_TRIMETRIC—Sets the view orientation to trimetric.
  wfcVIEW_ORIENTATION_USERDEFINED—Sets the view orientation to user-defined.
•  XAngle—This input argument is required when the Orientation type is specified as wfcVIEW_ORIENTATION_USERDEFINED. For all other orientation types, this argument is ignored.
•  YAngle—This input argument is required when the Orientation type is specified as wfcVIEW_ORIENTATION_USERDEFINED. For all other orientation types, this argument is ignored.
The method wfcWView2D::SetOrientationFromReference orients the view using geometric references.
•  MdlOrient1—Specifies the orientation of the first geometric reference using the enumerated data type wfcDrawingViewOrientationRefType. The orientation types are:
  wfcVIEW_ORIENTATION_REF_FRONT—Orients the view by using the front surface as a reference.
  wfcVIEW_ORIENTATION_REF_BACK—Orients the view by using the back surface as a reference.
  wfcVIEW_ORIENTATION_REF_LEFT—Orients the view by using the left surface as a reference.
  wfcVIEW_ORIENTATION_REF_RIGHT—Orients the view by using the right surface as a reference.
  wfcVIEW_ORIENTATION_REF_TOP—Orients the view by using the top surface as a reference.
  wfcVIEW_ORIENTATION_REF_BOTTOM—Orients the view by using the bottom surface as a reference.
  wfcVIEW_ORIENTATION_REF_VERTAXIS—Orients the view by using the vertical axis as a reference.
  wfcVIEW_ORIENTATION_REF_HORIZAXIS—Orients the view by using the horizontal axis as a reference.
•  OrientRef1—Specifies the first reference selection on the model.
•  MdlOrient2—Specifies the orientation of the second geometric reference using the enumerated data type wfcDrawingViewOrientationRefType.
•  OrientRef2—Specifies the second reference selection on the model.
The method wfcWView2D::SetOrientationFromAngle orients the specified drawing view using angles of selected references or custom angles. The input arguments are:
•  RotationAngleRef—Specifies the angle reference using the enumerated data type wfcDrawingViewOrientationAngleType. The angle types are:
  wfcVIEW_ORIENTATION_ANGLE_NORMAL—Orients the model around an axis through the view origin and normal to the drawing sheet.
  wfcVIEW_ORIENTATION_ANGLE_HORIZONTAL—Orients the model around an axis through the view origin and horizontal to the drawing sheet.
  wfcVIEW_ORIENTATION_ANGLE_VERTICAL—Orients the model around an axis through the view origin and vertical to the drawing sheet.
  wfcVIEW_ORIENTATION_ANGLE_EDGE_AXIS—Orients the model around an axis through the view origin and according to the designated angle to the drawing sheet.
•  RefAngle—Specifies the angle in degrees with the selected reference.
•  AxisSel—Specifies the reference selection. It can be an axis or NULL for other type.
Sections of a View
Methods Introduced:
The method wfcWView2D::GetDrawingViewSectionType retrieves the section type for a specified drawing view using the enumerated data type wfcDrawingViewSectionType. A section can be of the following types:
•  wfcVIEW_NO_SECTION—Specifies no section.
•  wfcVIEW_TOTAL_SECTION—Specifies the complete drawing view.
•  wfcVIEW_AREA_SECTION—Specifies a 2D cross section.
•  wfcVIEW_PART_SURF_SECTION—Specifies a 3D cross section.
•  wfcVIEW_3D_SECTION—Specifies a section created out of a solid surface or a datum quilt in the model.
The methods wfcWView2D::GetSection2DInstructions and wfcWView2D::SetSection2DInstructions retrieve and set the 2D cross section for a specified drawing view as a wfcSection2DInstructions object.
The method wfcSection2DInstructions::Create creates a data object that contains information about the 2D cross section.
The methods wfcSection2DInstructions::GetSectionAreaType and wfcSection2DInstructions::SetSectionAreaType retrieve and set the type of section area. The section area is given by the enumerated type wfcDrawingViewSectionAreaType and can be of the following types:
•  wfcVIEW_SECTION_AREA_FULL—Sectioning is applied to the full drawing view.
•  wfcVIEW_SECTION_AREA_HALF—Sectioning is applied to half drawing view depending upon the inputs for half side.
•  wfcVIEW_SECTION_AREA_LOCAL—Specifies local sectioning.
•  wfcVIEW_SECTION_AREA_UNFOLD—Unfold the drawing view and section it.
•  wfcVIEW_SECTION_AREA_ALIGNED—Sectioning is as per the aligned views.
The methods wfcSection2DInstructions::GetSectionName and wfcSection2DInstructions::SetSectionName retrieve and set the name of the 2D cross section.
The methods wfcSection2DInstructions::GetReference and wfcSection2DInstructions::SetReference retrieve and set the selection reference as a pfcSelection object.
The methods wfcSection2DInstructions::GetCurveData and wfcSection2DInstructions::SetCurveData retrieve and set the spline curve data as a pfcCurveDescriptor object. The information about curve geometry is given by the enumerated data type pfcCurveType.
The methods wfcSection2DInstructions::GetArrowDisplayView and wfcSection2DInstructions::SetArrowDisplayView retrieve and set the drawing view, that is, either the parent or child view, where the section arrow is to be displayed.
The method wfcWView2D::GetSinglePartSection retrieves the section created out of a solid surface or a datum quilt in the model for a specified drawing view.
The method wfcWView2D::SetSinglePartSection assigns the reference selection as a pfcSelection object for the solid surface or datum quilt that is used to create the section in the view.
The method wfcWView2D::Get3DSectionName retrieves the name of the 3D cross section for the drawing view.
The method wfcWView2D::Is3DSectionXHatchingShown checks if Xhatching is displayed in the 3D cross-sectional view.
The method wfcWView2D::Set3DSection assigns the following arguments to define a 3D cross section for a view:
•  SectionName—Specifies the name of the 3D cross section.
•  ShowXHatch—Specifies a boolean value that determines whether the cross section hatching must be displayed in the 3D cross-sectional view. Set this argument to true to display the X-hatching
Visible Areas of Views
Methods Introduced:
As you detail your model, certain portions of the model may be more relevant than others or may be clearer if displayed from a different view point. You can define the visible area of the view to determine which portion or portions to show or hide.
The method wfcWView2D::SetVisibleArea assigns the type of visible area for a specified drawing view using the enumerated data type wfcVisibleAreaInstruction object.
The method wfcWView2D::GetVisibleAreaInstructions retrieves the type of visible area in terms of wfcVisibleAreaInstruction object for a specified drawing view.
The method wfcVisibleAreaInstruction::GetType retrieves the type of visible area for a specified drawing view using the enumerated type wfcDrawingViewVisibleareaType. The visible area can be of the following types:
•  wfcVIEW_FULL_AREA—The complete drawing view is retained as the visible area.
•  wfcVIEW_HALF_AREA—A portion of the model from the view on one side of a cutting plane is removed.
•  wfcVIEW_PARTIAL_AREA—A portion of the model in a view within a closed boundary is displayed.
•  wfcVIEW_BROKEN_AREA—A portion of the model view from between two or more selected points is removed, and the gap between the remaining two portions is closed within a specified distance.
Note
A broken visible area can be created only for general and projected view types.
The method wfcBreakAreaInstruction::Create enables you to create the instructions for a break area in a drawing view. The input arguments are:
•  ViewBrokenDir—Specify the direction of the broken lines that define the broken area to be removed in terms of the enumerated type wfcViewBrokenDir.
•  FirstBreakLine—Specify the selection point in terms of the pfcSelection object for the first break line.
•  SecondBreakLine—Specify the selection point in terms of the pfcSelection object for the second break line.
•  ViewBrokenLineStyle—Specifies the line style for the broken lines in terms of the enumerated type wfcViewBrokenLineStyle.
The methods wfcBreakAreaInstruction::GetCurveData and wfcBreakAreaInstruction::SetCurveData retrieve and set the spline curve data in terms of the pfcCurveDescriptor object. These methods are applicable only for wfcVIEW_BROKEN_LINE_S_CURVE_GEOMETRY line style.
The methods wfcBreakAreaInstruction::GetFirstBreakLine and wfcBreakAreaInstruction::SetFirstBreakLine retrieve and set the selection point in terms of the pfcSelection object for the first break line.
The methods wfcBreakAreaInstruction::GetSecondBreakLine and wfcBreakAreaInstruction::SetSecondBreakLine retrieve and set the selection point in terms of the pfcSelection object for the second break line.
The methods wfcBreakAreaInstruction::GetViewBrokenDir and wfcBreakAreaInstruction::SetViewBrokenDir retrieve and set the direction of the broken lines that define the broken area to be removed. The direction is given by the enumerated type wfcViewBrokenDir and it takes the following values:
•  wfcVIEW_BROKEN_DIR_HORIZONTAL—Specifies the horizontal direction.
•  wfcVIEW_BROKEN_DIR_VERTICAL—Specifies the vertical direction.
The methods wfcBreakAreaInstruction::GetViewBrokenLineStyle and wfcBreakAreaInstruction::SetViewBrokenLineStyle retrieve and set the line style for the broken lines in terms of the enumerated type wfcViewBrokenLineStyle. It can be one of the following types:
•  wfcVIEW_BROKEN_LINE_STRAIGHT—Specifies a straight broken line.
•  wfcVIEW_BROKEN_LINE_SKETCH—Specifies a random sketch drawn by the user that defines the broken line.
•  wfcVIEW_BROKEN_LINE_S_CURVE_OUTLINE—Specifies a S-curve on the view outline.
•  wfcVIEW_BROKEN_LINE_S_CURVE_GEOMETRY—Specifies a S-curve on the geometry.
•  wfcVIEW_BROKEN_LINE_HEART_BEAT_OUTLINE—Specifies a heartbeat type of curve on the view outline.
•  wfcVIEW_BROKEN_LINE_HEART_BEAT_GEOMETRY—Specifies a heartbeat type of curve on the geometry.
The method wfcBrokenAreaVisibility::Create enables you to create a broken visible area in a drawing view. The input argument is instructions, which is a collection of objects to create the break area.
The methods wfcBrokenAreaVisibility::GetInstructions and wfcBrokenAreaVisibility::SetInstructions retrieve and set the instructions for a visible broken area in a drawing view.
The method wfcFullAreaVisibility::Create enables you to create a full visible area in a drawing view.
The method wfcHalfAreaVisibility::Create enables you to create a half visible area in a drawing view.
The method wfcHalfAreaVisibility::DisplayLeftSide displays the left side of the half visible area.
The method wfcHalfAreaVisibility::IsLeftSideDisplayed identifies if the left side of a half visible area is displayed.
The methods wfcHalfAreaVisibility::GetLineType and wfcHalfAreaVisibility::SetLineType retrieve and set the line type in a half visible area in terms of the enumerated type wfcDrawingLineStandardType and it takes the following values:
•  wfcHVL_NONE—Specifies no line.
•  wfcHVL_SOLID—Specifies a solid line.
•  wfcHVL_SYMMETRY—Specifies a symmetrical line.
•  wfcHVL_SYMMETRY_ISO—Specifies an ISO-standard symmetrical line.
•  wfcHVL_SYMMETRY_ASME—Specifies an ASME-standard symmetrical line.
The methods wfcHalfAreaVisibility::GetReference and wfcHalfAreaVisibility::SetReference retrieve and set the selection reference in terms of the pfcSelectionobject that divides the drawing view. The cutting plane can be a planar surface or a datum, but it must be perpendicular to the screen in the new view.
The method wfcPartialAreaVisibility::Create enables you to create a partial visible area in a drawing view.
The methods wfcPartialAreaVisibility::GetCurveData and wfcPartialAreaVisibility::SetCurveData retrieve and set the spline curve data in a partial visible area in terms of the pfcCurveDescriptor object.
The methods wfcPartialAreaVisibility::GetReferencePoint and wfcPartialAreaVisibility::SetReferencePoint retrieve and set the reference point in terms of the pfcSelection object.
The method wfcPartialAreaVisibility::IsBoundaryShown identifies if the boundary of the partial visible area contained within the spline is shown.
The method wfcPartialAreaVisibility::ShowBoundary displays or shows the boundary of the partial visible area contained within the spline.
Refer to the Detailed Drawings module from the Creo Parametric Help for more information on Visible Area of the View.
View States
Methods Introduced:
In the method wfcWView2D::SetExplodedState set the input argument ExplodedState as true, to display the specified drawing view in the exploded state.
The method wfcWView2D::IsExplodedState checks if the specified view is set to be displayed in the exploded state.
The method wfcWView2D::SetSimpRep retrieves the simplified representation for a specified drawing view.
Drawing Models
Methods Introduced:
The method wfcWDrawing::VisitDrawingModels visits the solids in the specified drawing.
Drawing Edges
The methods described in this section provide access to the display properties such as color, line font, and thickness of model edges in drawing views. Model edges can be regular edges, silhouette edges, or non-analytical silhouette edges.
Note
You can select model edges from detailed views for modification, but no change will be applied. To modify the display of a model edge in a detailed view, you must select the edge in the parent view.
Methods Introduced:
The methods wfcWDrawing::GetEdgeDisplay and wfcWDrawing::SetEdgeDisplay retrieve and set the display properties of a specified model edge in a drawing view as a wfcEdgeDisplay object. After assigning the properties, you must repaint the drawing view to update the display.
The method wfcEdgeDisplay::Create creates a data object that contains information about the display properties of an edge in a drawing view.
The methods wfcEdgeDisplay::GetColor and wfcEdgeDisplay::SetColor retrieve and set the color to be used for the display of a specified model edge.
The methods wfcEdgeDisplay::GetFont and wfcEdgeDisplay::SetFont retrieve and set the line font to be used for the display of a specified model edge.
The methods wfcEdgeDisplay::GetWidth and wfcEdgeDisplay::SetWidth retrieve and set the width to be used for the display of a specified model edge. You must pass a value less than zero to use the default width.
The method wfcWDrawing::IsEdgeDisplayGlobal checks if the model edge display properties such as color, line font, and width have been applied globally to all the drawing views in the drawing sheet.
The method wfcWDrawing::SetEdgeDisplayGlobal sets the flag that assigns the model edge display properties such as color, line font, and width globally to all the drawing views in the drawing sheet.
Detail Items
The methods described in this section operate on detail items.
In Creo Object TOOLKIT C++ you can create, delete and modify detail items, control their display, and query what detail items are present in the drawing. The types of detail items available are:
•  Draft Entities—Contain graphical items created in Creo. The items are as follows:
  Arc
  Ellipse
  Line
  Point
  Polygon
  Spline
•  Notes—Textual annotations
•  Symbol Definitions—Contained in the drawing’s symbol gallery.
•  Symbol Instances—Instances of a symbol placed in a drawing.
•  Draft Groups—Groups of detail items that contain notes, symbol instances, and draft entities.
•  OLE objects—Object Linking and Embedding (OLE) objects embedded in the Creo drawing file.
Listing Detail Items
Methods Introduced:
The method pfcModelItemOwner::ListItems returns a list of detail items specified by the parameter Type or returns null if no detail items of the specified type are found.
The values of the parameter Type for detail items are:
•  pfcITEM_DTL_ENTITY—Detail Entity
•  pfcITEM_DTL_NOTE—Detail Note
•  pfcITEM_DTL_GROUP—Draft Group
•  pfcITEM_DTL_SYM_DEFINITION—Detail Symbol Definition
•  pfcITEM_DTL_SYM_INSTANCE—Detail Symbol Instance
•  pfcITEM_DTL_OLE_OBJECT—Drawing embedded OLE object
If this parameter is set to null, then all the model items in the drawing are listed.
If the model has multiple bodies, the method pfcModelItemOwner::ListItems returns the exception pfcXToolkitMultibodyUnsupported.
The method pfcDetailItemOwner::ListDetailItems also lists the detail items in the model. Pass the type of the detail item and the sheet number that contains the specified detail items.
Set the input parameter Type to the type of detail item to be listed. Set it to null to return all the detail items. The input parameter SheetNumberdetermines the sheet that contains the specified detail item. Pass null to search all the sheets. This argument is ignored if the parameter Type is set to pfcDETAIL_SYM_DEFINITION.
The method returns a sequence of detail items and returns a null if no items matching the input values are found.
The method pfcModelItemOwner::GetItemById returns a detail item based on the type of the detail item and its integer identifier. The method returns a null if a detail item with the specified attributes is not found.
Creating, Modifying and Reading Detail Items
Methods Introduced:
The method pfcDetailItemOwner::CreateDetailItem creates a new detail item based on the instruction data object that describes the type and content of the new detail item. The instructions data object is returned by the method pfcDetailGroupInstructions::Create. The method returns the newly created detail item.
The method wfcWDetailSymbolDefItem::CopyToAnotherModel copies a specified symbol definition from one model to another. Pass the model to which the symbol definition must be copied as the input argument.
Detail Note Data
Methods Introduced:
The method wfcWDetailNoteItem::CollectSymbolInstances retrieves a list of all the symbol instances that are declared in a detail note. The symbol instances are returned in the order in which they are seen in the note text.
The method pfcDetailNoteItem::GetNoteTextStyle and pfcDetailNoteItem::SetNoteTextStyle retrieve and set the text style for the specified note as a pfcAnnotationTextStyle object. Refer to the section AnnotationTextStyles, for more information on TextStyles.
Cross-referencing 3D Notes and Drawing Annotations
The methods described in this section provide access to the drawing object that represents a shown 3D note, (if the 3D note is shown in the drawing), or vice-versa.
Methods Introduced:
The method wfcWDetailNoteItem::GetAssociativeNoteInDrawing retrieves a detail note in the drawing that represents the specified model note in a solid. Specify the drawing in the input argument DrawingModel.
Note
This method retrieves the first detail note that calls out the solid model note. Creo Parametric does not restrict users to showing only a single version of a solid model note callout.
The method wfcWDetailNoteItem::GetAssociativeNoteInSolid retrieves the model note in a solid that is displayed as a detail note in the drawing.
The method wfcGTol::GetDetailNote returns the detail note that represents a shown geometric tolerance.
Note
This method returns the first detail note that calls out the solid model note. Creo Parametric does not restrict users to showing only a single version of a solid model note callout.
Symbol Definition Attachments
Methods Introduced:
The method wfcWDetailSymbolDefItem::AddAttachment adds parametric leader attachments to the symbol definition.
Symbol Instance Data
Methods Introduced:
The method wfcWDetailSymbolInstItem::GetAttachedDimension retrieves the dimension to which the specified symbol instance is attached as a pfcDimension object. The method throws an exception pfcXToolkitBadContext when the dimension to which the specified symbol instance is attached is not available. In this case, the model containing the dimension was either deleted or suppressed in the assembly.
The method wfcWDetailSymbolInstItem::AddLeader adds a leader to a symbol instance description.
The method wfcWDetailSymbolInstItem::AddVarText adds variable text to the symbol instance.
The method wfcWDetailSymbolInstItem::GetNoteInstructions retrieves the data of a note in the symbol instance as a pfcDetailNoteInstructions object. The input arguments are:
•  Item—Specifies the note attached to the symbol instance as a pfcDetailNoteItem object.
•  DispMode—Specifies the display mode for parameters and dimensions in the note using the enumerated data type pfcDimDisplayMode. The valid values are:
  pfcDIM_DISPLAY_NUMERIC—Displays the parameters and dimensions as numeric values.
  pfcDIM_DISPLAY_SYMBOLIC—Displays the parameters and dimensions as symbolic values.
Refer to the section Instructions for more information on pfcDetailNoteInstructions methods.
The method wfcWDetailSymbolInstItem::GetEntityInstructions retrieves the data of an entity in the symbol instance as a pfcDetailEntityInstructions object.
Refer to the sectionInstructions for more information on pfcDetailEntityInstructions methods.
Cross-referencing Weld Symbols and Drawing Annotations
The methods described in this section provide a drawing object that represents a shown weld symbol, if the weld symbol is shown in the drawing, or the weld feature that owns a shown weld symbol.
Methods Introduced:
The method wfcWDetailSymbolInstItem::GetFeature retrieves the weld feature that owns the shown weld symbol.
Detail Group Data
Methods Introduced:
The method wfcWDetailGroupItem::AddElement adds an item to the group contents. Items supported in the groups include entities, notes, symbol instances, and draft drawing dimensions.
Drawing Symbol Groups
This section describes Creo Object TOOLKIT C++ methods that give access to user-defined groups contained in drawing symbols. Creo Parametric allows a hierarchal relationship between the groups in a symbol definition. Thus, some groups contain groups, or are parents of other groups.
Manipulating Symbol Groups
Methods Introduced:
The method wfcWDetailSymbolGroup::AddItem adds a single item to the symbol group, provided such an item belongs to the symbol definition. The item to be added can be a detail entity or a note.
Detail Entities
A detail entity in Creo Object TOOLKIT C++ is represented by the interface pfcDetailEntityItem. It is a child of the pfcDetail interface.
The interface pfcDetailEntityInstructions contains specific information used to describe a detail entity item.
Instructions
Methods Introduced:
The method pfcDetailEntityInstructions::Create creates an instructions object that describes how to construct a detail entity, for use in the methods pfcDetailItemOwner::CreateDetailItem, pfcDetailSymbolDefItem::CreateDetailItem, and pfcDetailEntityItem::Modify.
The instructions object is created based on the curve geometry and the drawing view associated with the entity. The curve geometry describes the trajectory of the detail entity in world units. The drawing view can be a model view returned by the method pfcModel2D::List2DViews or a drawing sheet background view returned by the method pfcSheetOwner::GetSheetBackgroundView. The background view indicates that the entity is not associated with a particular model view.
The method returns the created instructions object.
Note
Changes to the values of a pfcDetailEntityInstructions object do not take effect until that instructions object is used to modify the entity using pfcDetailEntityItem::Modify.
The method pfcDetailEntityInstructions::GetGeometry returns the geometry of the detail entity item.
The method pfcDetailEntityInstructions::SetGeometry sets the geometry of the detail entity item. For more information refer to Curve Descriptors.
The method pfcDetailEntityInstructions::GetIsConstruction returns a value that specifies whether the entity is a construction entity.
The method pfcDetailEntityInstructions::SetIsConstruction specifies if the detail entity is a construction entity.
The method pfcDetailEntityInstructions::GetColor returns the color of the detail entity item.
The method pfcDetailEntityInstructions::SetColor sets the color of the detail entity item. Pass null to use the default drawing color.
The method pfcDetailEntityInstructions::GetFontName returns the line style used to draw the entity. The method returns a null value if the default line style is used.
The method pfcDetailEntityInstructions::SetFontName sets the line style for the detail entity item. Pass null to use the default line style.
The method pfcDetailEntityInstructions::GetWidth returns the value of the width of the entity line. The method returns a null value if the default line width is used.
The method pfcDetailEntityInstructions::SetWidth specifies the width of the entity line. Pass null to use the default line width.
The method pfcDetailEntityInstructions::GetView returns the drawing view associated with the entity. The view can either be a model view or a drawing sheet background view.
The method pfcDetailEntityInstructions::SetView sets the drawing view associated with the entity. The view can either be a model view or a drawing sheet background view.
Detail Entities Information
Methods Introduced:
The method pfcDetailEntityItem::GetInstructions returns the instructions data object that is used to construct the detail entity item.
The method pfcDetailEntityItem::GetSymbolDef returns the symbol definition that contains the entity. This method returns a null value if the entity is not a part of a symbol definition.
Detail Entities Operations
Methods Introduced:
The method pfcDetailEntityItem::Draw temporarily draws a detail entity item, so that it is removed during the next draft regeneration.
The method pfcDetailEntityItem::Erase undraws a detail entity item temporarily, so that it is redrawn during the next draft regeneration.
The method pfcDetailEntityItem::Modify modifies the definition of an entity item using the specified instructions data object.
OLE Objects
An object linking and embedding (OLE) object is an external file, such as a document, graphics file, or video file that is created using an external application and which can be inserted into another application, such as Creo. You can create and insert supported OLE objects into a two-dimensional Creo file, such as a drawing, report, format file, notebook, or diagram. The functions described in this section enable you to identify and access OLE objects embedded in drawings.
Methods Introduced:
The method pfcDetailOLEObject::GetApplicationType returns the type of the OLE object as a string, for example, Microsoft Word Document.
The method pfcDetailOLEObject::GetOutline returns the extent of the OLE object embedded in the drawing.
The method pfcDetailOLEObject::GetPath returns the path to the external file for each OLE object, if it is linked to an external file.
The method pfcDetailOLEObject::GetSheet returns the sheet number for the OLE object.
Detail Notes
A detail note in Creo Object TOOLKIT C++ is represented by the interface pfcDetailNoteItem. It is a child of the pfcDetail interface.
The interface pfcDetailNoteInstructions contains specific information that describes a detail note.
The interface pfcDetailNoteInstructions and all the methods under this interface are deprecated.
Instructions
Methods Introduced:
The method pfcDetailNoteInstructions::Create creates a data object that describes how a detail note item should be constructed when passed to the methods pfcDetailItemOwner::CreateDetailItem, pfcDetailSymbolDefItem::CreateDetailItem, or pfcDetailNoteItem::Modify. The parameter inTextLines specifies the sequence of text line data objects that describe the contents of the note.
Note
Changes to the values of a pfcDetailNoteInstructions object do not take effect until that instructions object is used to modify the note using pfcDetailNoteItem::Modify.
For creating a detail note item, the method pfcDetailItemOwner::CreateDetailItem is deprecated, as it uses the deprecated interface pfcDetailNoteInstructions. Use the methods pfcDetailItemOwner::CreateFreeNote, pfcDetailItemOwner::CreateOffsetNote, pfcDetailItemOwner::CreateOnItemNote, or pfcDetailItemOwner::CreateLeaderNote instead.
The method pfcDetailNoteInstructions::GetTextLines returns the description of text line contents in the note.
The method pfcDetailNoteInstructions::SetTextLines sets the description of the text line contents in the note.
The method pfcDetailNoteInstructions::GetIsDisplayed returns a boolean indicating if the note is currently displayed.
The method pfcDetailNoteInstructions::SetIsDisplayed sets the display flag for the note.
The method pfcDetailNoteInstructions::GetIsReadOnly determines whether the note can be edited by the user, while the method pfcDetailNoteInstructions::SetIsReadOnly toggles the read only status of the note.
The method pfcDetailNoteInstructions::GetIsMirrored determines whether the note is mirrored, while the method pfcDetailNoteInstructions::SetIsMirrored toggles the mirrored status of the note.
The method pfcDetailNoteInstructions::GetHorizontal returns the value of the horizontal justification of the note, while the method pfcDetailNoteInstructions::SetHorizontal sets the value of the horizontal justification of the note.
The method pfcDetailNoteInstructions::GetVertical returns the value of the vertical justification of the note, while the method pfcDetailNoteInstructions::SetVertical sets the value of the vertical justification of the note.
The method pfcDetailNoteInstructions::GetColor returns the color of the detail note item. The method returns a null value to represent the default drawing color.
Use the method pfcDetailNoteInstructions::SetColor to set the color of the detail note item. Pass null to use the default drawing color.
The method pfcDetailNoteInstructions::GetLeader returns the locations of the detail note item and information about the leaders.
The method pfcDetailNoteInstructions::SetLeader sets the values of the location of the detail note item and the locations where the leaders are attached to the drawing.
The method pfcDetailNoteInstructions::GetTextAngle returns the value of the angle of the text used in the note. The method returns a null value if the angle is 0.0.
The method pfcDetailNoteInstructions::SetTextAngle sets the value of the angle of the text used in the note. Pass null to use the angle 0.0.
Detail Notes Information
Methods Introduced:
The method pfcDetailNoteItem::GetInstructions returns an instructions data object that describes how to construct the detail note item. This method takes a ProBoolean argument, GiveParametersAsNames, which determines whether symbolic representations of parameters and drawing properties in the note text should be displayed, or the actual text seen by the user should be displayed.
Note
Creo does not resolve and replace symbolic callouts for notes which are not displayed. Therefore, if the note is not displayed or is hidden in a layer, the text retrieved may contain symbolic callouts, even when GiveParametersAsNames is false.
The method pfcDetailNoteItem::GetSymbolDef returns the symbol definition that contains the note. The method returns a null value if the note is not a part of a symbol definition.
The method pfcDetailNoteItem::GetLineEnvelope determines the screen coordinates of the envelope around the detail note. This envelope is defined by four points. The following figure illustrates how the point order is determined.
Image
The ordering of the points is maintained even if the notes are mirrored or are at an angle.
The method pfcDetailNoteItem::GetModelReference returns the model referenced by the parameterized text in a note. The model is referenced based on the line number and the text index where the parameterized text appears.
Details Notes Operations
Methods Introduced:
The method pfcDetailNoteItem::Draw temporarily draws a detail note item, so that it is removed during the next draft regeneration.
The method pfcDetailNoteItem::Show displays the note item, such that it is repainted during the next draft regeneration.
The method pfcDetailNoteItem::Erase undraws a detail note item temporarily, so that it is redrawn during the next draft regeneration.
The method pfcDetailNoteItem::Remove undraws a detail note item permanently, so that it is not redrawn during the next draft regeneration.
The method pfcDetailNoteItem::KeepArrowTypeAsIs allows you to keep arrow type of the leader note as it is, after a note is modified. You must call this method before the method pfcDetailNoteItem::Modify is called.
The method pfcDetailNoteItem::Modify modifies the definition of an existing detail note item based on the instructions object that describes the new detail note item.
Detail Groups
A detail group in Creo Object TOOLKIT C++ is represented by the interface pfcDetailGroupItem. It is a child of the pfcDetailItem interface.
The interface pfcDetailGroupInstructions contains information used to describe a detail group item.
Instructions
Method Introduced:
The method pfcDetailGroupInstructions::Create creates an instruction data object that describes how to construct a detail group for use in pfcDetailItemOwner::CreateDetailItem and pfcDetailGroupItem::Modify.
Note
Changes to the values of a pfcDetailGroupInstructions object do not take effect until that instructions object is used to modify the group using pfcDetailGroupItem::Modify.
The method pfcDetailGroupInstructions::GetName returns the name of the detail group.
The method pfcDetailGroupInstructions::SetName sets the name of the detail group.
The method pfcDetailGroupInstructions::GetElements returns the sequence of the detail items(notes, groups and entities) contained in the group.
The method pfcDetailGroupInstructions::SetElements sets the sequence of the detail items contained in the group.
The method pfcDetailGroupInstructions::GetIsDisplayed returns whether the detail group is displayed in the drawing.
The method pfcDetailGroupInstructions::SetIsDisplayed toggles the display of the detail group.
Detail Groups Information
Method Introduced:
The method pfcDetailGroupItem::GetInstructions gets a data object that describes how to construct a detail group item. The method returns the data object describing the detail group item.
Detail Groups Operations
Methods Introduced:
The method pfcDetailGroupItem::Draw temporarily draws a detail group item, so that it is removed during the next draft generation.
The method pfcDetailGroupItem::Erase temporarily undraws a detail group item, so that it is redrawn during the next draft generation.
The method pfcDetailGroupItem::Modify changes the definition of a detail group item based on the data object that describes how to construct a detail group item.
Detail Symbols
Detail Symbol Definitions
A detail symbol definition in Creo Object TOOLKIT C++ is represented by the interface pfcDetailSymbolDefItem. It is a child of the pfcDetailItem interface.
The interface pfcDetailSymbolDefInstructions contains information that describes a symbol definition. It can be used when creating symbol definition entities or while accessing existing symbol definition entities.
Instructions
Methods Introduced:
The method pfcDetailSymbolDefInstructions::Create creates an instruction data object that describes how to create a symbol definition based on the path and name of the symbol definition. The instructions object is passed to the methods pfcCreateDetailItem and pfcModify.
Note
Changes to the values of a pfcDetailSymbolDefInstructions object do not take effect until that instructions object is used to modify the definition using the method pfcDetailSymbolDefItem::Modify.
The method pfcDetailSymbolDefInstructions::GetSymbolHeight returns the value of the height type for the symbol definition. The symbol definition height options are as follows:
•  pfcSYMDEF_FIXED—Symbol height is fixed.
•  pfcSYMDEF_VARIABLE—Symbol height is variable.
•  pfcSYMDEF_RELATIVE_TO_TEXT—Symbol height is determined relative to the text height.
The method pfcDetailSymbolDefInstructions::SetSymbolHeight sets the value of the height type for the symbol definition.
The method pfcDetailSymbolDefInstructions::GetHasElbow determines whether the symbol definition includes an elbow.
The method pfcDetailSymbolDefInstructions::SetHasElbow decides if the symbol definition should include an elbow.
The method pfcDetailSymbolDefInstructions::GetIsTextAngleFixed returns whether the text of the angle is fixed.
The method pfcDetailSymbolDefInstructions::SetIsTextAngleFixed toggles the requirement that the text angle be fixed.
The method pfcDetailSymbolDefInstructions::GetScaledHeight returns the height of the symbol definition in inches.
The method pfcDetailSymbolDefInstructions::GetAttachments returns the value of the sequence of the possible instance attachment points for the symbol definition.
The method pfcDetailSymbolDefInstructions::SetAttachments sets the value of the sequence of the possible instance attachment points for the symbol definition.
The method pfcDetailSymbolDefInstructions::GetFullPath returns the value of the complete path of the symbol definition file.
The method pfcDetailSymbolDefInstructions::SetFullPath sets the value of the complete path of the symbol definition path.
The method pfcDetailSymbolDefInstructions::GetReference returns the text reference information for the symbol definition. It returns a null value if the text reference is not used. The text reference identifies the text item used for a symbol definition which has a height type of pfcSYMDEF_RELATIVE_TO_TEXT.
The method pfcDetailSymbolDefInstructions::SetReference sets the text reference information for the symbol definition.
Detail Symbol Definitions Information
Methods Introduced:
The method pfcDetailSymbolDefItem::ListDetailItems lists the detail items in the symbol definition based on the type of the detail item.
The method pfcDetailSymbolDefItem::GetInstructions returns an instruction data object that describes how to construct the symbol definition.
Detail Symbol Definitions Operations
Methods Introduced:
The method pfcDetailSymbolDefItem::CreateDetailItem creates a detail item in the symbol definition based on the instructions data object. The method returns the detail item in the symbol definition.
The method pfcDetailSymbolDefItem::Modify modifies a symbol definition based on the instructions data object that contains information about the modifications to be made to the symbol definition.
Retrieving Symbol Definitions
Methods Introduced:
From Creo 4.0 F000 onwards, the method pfcDetailItemOwner::RetrieveSymbolDefinition has been deprecated. Use the method pfcDetailItemOwner::RetrieveSymbolDefItem instead.
Creo Parametric symbols exist in two different areas: the user-defined area and the system symbols area.
The method pfcDetailItemOwner::RetrieveSymbolDefItem retrieves a symbol definition from the user-defined location designated by the configuration option pro_symbol_dir. The symbol definition should have been previously saved to a file using Creo Parametric.
The method pfcDetailItemOwner::RetrieveSymbolDefItem also retrieves a symbol definition from the system directory. The system area contains symbols provided by Creo Parametric with the Detail module (such as the Welding Symbols Library).
The input parameters of this method are:
•  FileName—Name of the symbol definition file.
•  Source—Source of the symbol definition file. The input parameter Source is defined by the enumerated type pfcDetailSymbolDefItemSource. The valid values which are supported are listed below:
  pfcDTLSYMDEF_SRC_SYSTEM—Specifies the system symbol definition directory.
  pfcDTLSYMDEF_SRC_PATH—Specifies the absolute path to a directory containing the symbol definition.
•  FilePath—Path to the symbol definition file. It is relative to the path specified by the option pro_symbol_dir in the configuration file. A null value indicates that the function should search the current directory.
•  Version—Numerical version of the symbol definition file. A null value retrieves the latest version.
•  UpdateUnconditionally—True if Creo should update existing instances of this symbol definition, or false to quit the operation if the definition exists in the model.
The method returns the retrieved symbol definition.
Detail Symbol Instances
A detail symbol instance in Creo Object TOOLKIT C++ is represented by the interface pfcDetailSymbolInstItem. It is a child of the pfcDetailItem interface.
The interface pfcDetailSymbolInstInstructions contains information that describes a symbol instance. It can be used when creating symbol instances and while accessing existing groups.
Instructions
Methods Introduced:
The method pfcDetailSymbolInstInstructions::Create creates a data object that contains information about the placement of a symbol instance.
Note
Changes to the values of a pfcDetailSymbolInstInstructions object do not take effect until that instructions object is used to modify the instance using pfcDetailSymbolInstItem::Modify.
The method pfcDetailSymbolInstInstructions::GetIsDisplayed returns a value that specifies whether the instance of the symbol is displayed.
Use the method pfcDetailSymbolInstInstructions::SetIsDisplayed to switch the display of the symbol instance.
The method pfcDetailSymbolInstInstructions::GetColor returns the color of the detail symbol instance. A null value indicates that the default drawing color is used.
The method pfcDetailSymbolInstInstructions::SetColor sets the color of the detail symbol instance. Pass null to use the default drawing color.
The method pfcDetailSymbolInstInstructions::GetSymbolDef returns the symbol definition used for the instance.
The method pfcDetailSymbolInstInstructions::SetSymbolDef sets the value of the symbol definition used for the instance.
The method pfcDetailSymbolInstInstructions::GetAttachOnDefType returns the attachment type of the instance. The method returns a null value if the attachment represents a free attachment. The attachment options are as follows:
•  pfcSYMDEFATTACH_FREE—Attachment on a free point.
•  pfcSYMDEFATTACH_LEFT_LEADER—Attachment via a leader on the left side of the symbol.
•  pfcSYMDEFATTACH_RIGHT_LEADER— Attachment via a leader on the right side of the symbol.
•  pfcSYMDEFATTACH_RADIAL_LEADER—Attachment via a leader at a radial location.
•  pfcSYMDEFATTACH_ON_ITEM—Attachment on an item in the symbol definition.
•  pfcSYMDEFATTACH_NORMAL_TO_ITEM—Attachment normal to an item in the symbol definition.
The method pfcDetailSymbolInstInstructions::SetAttachOnDefType sets the attachment type of the instance.
The method pfcDetailSymbolInstInstructions::GetDefAttachment returns the value that represents the way in which the instance is attached to the symbol definition.
The method pfcDetailSymbolInstInstructions::SetDefAttachment specifies the way in which the instance is attached to the symbol definition.
The method pfcDetailSymbolInstInstructions::GetInstAttachment returns the value of the attachment of the instance that includes location and leader information.
The method pfcDetailSymbolInstInstructions::SetInstAttachment sets value of the attachment of the instance.
The method pfcDetailSymbolInstInstructions::GetAngle returns the value of the angle at which the instance is placed. The method returns a null value if the value of the angle is 0 degrees.
The method pfcDetailSymbolInstInstructions::SetAngle sets the value of the angle at which the instance is placed.
The method pfcDetailSymbolInstInstructions::GetScaledHeight returns the height of the symbol instance in the owner drawing or model coordinates. This value is consistent with the height value shown for a symbol instance in the Creo user interface.
Note
The scaled height obtained using the above method is partially based on the properties of the symbol definition assigned using the method pfcDetail.DetailSymbolInstInstructions.GetSymbolDef. Changing the symbol definition may change the calculated value for the scaled height.
The method pfcDetailSymbolInstInstructions::SetScaledHeight sets the value of the height of the symbol instance in the owner drawing or model coordinates.
The method pfcDetailSymbolInstInstructions::GetTextValues returns the sequence of variant text values used while placing the symbol instance.
The method pfcDetailSymbolInstInstructions::SetTextValues sets the sequence of variant text values while placing the symbol instance.
The method pfcDetailSymbolInstInstructions::GetCurrentTransform returns the coordinate transformation matrix to place the symbol instance.
The method pfcDetailSymbolInstInstructions::SetGroups sets the option for displaying groups in the symbol instance using the enumerated type pfcDetailSymbolGroupOption. It has the following values:
•  pfcDETAIL_SYMBOL_GROUP_INTERACTIVE—Symbol groups are interactively selected for display. This is the default value in the GRAPHICS mode.
•  pfcDETAIL_SYMBOL_GROUP_ALL—All non-exclusive symbol groups are included for display.
•  pfcDETAIL_SYMBOL_GROUP_NONE—None of the non-exclusive symbol groups are included for display.
•  pfcDETAIL_SYMBOL_GROUP_CUSTOM—Symbol groups specified by the application are displayed.
Refer to the section Detail Symbol Groups for more information on detail symbol groups.
Detail Symbol Instances Information
Method Introduced:
The method pfcDetailSymbolInstItem::GetInstructions returns an instructions data object that describes how to construct a symbol instance. This method takes a ProBoolean argument, GiveParametersAsNames, which determines whether symbolic representations of parameters and drawing properties in the symbol instance should be displayed, or the actual text seen by the user should be displayed.
Detail Symbol Instances Operations
Methods Introduced:
The method pfcDetailSymbolInstItem::Draw draws a symbol instance temporarily to be removed on the next draft regeneration.
The method pfcDetailSymbolInstItem::Erase undraws a symbol instance temporarily from the display to be redrawn on the next draft generation.
The method pfcDetailSymbolInstItem::Show displays a symbol instance to be repainted on the next draft regeneration.
The method pfcDetailSymbolInstItem::Remove deletes a symbol instance permanently.
The method pfcDetailSymbolInstItem::Modify modifies a symbol instance based on the instructions data object that contains information about the modifications to be made to the symbol instance.
Detail Symbol Groups
A detail symbol group in Creo Object TOOLKIT C++ is represented by the interface pfcDetailSymbolGroup. It is a child of the pfcObject interface. A detail symbol group is accessible only as a part of the contents of a detail symbol definition or instance.
The interface pfcDetailSymbolGroupInstructions contains information that describes a symbol group. It can be used when creating new symbol groups, or while accessing or modifying existing groups.
Instructions
Methods Introduced:
The method pfcDetailSymbolGroupInstructions::Create creates the pfcDetailSymbolGroupInstructions data object that stores the name of the symbol group and the list of detail items to be included in the symbol group.
Note
Changes to the values of the pfcDetailSymbolGroupInstructions data object do not take effect until this object is used to modify the instance using the method pfcDetailSymbolGroup.Modify.
The method pfcDetailSymbolGroupInstructions::GetItems returns the list of detail items included in the symbol group.
The method pfcDetailSymbolGroupInstructions::SetItems sets the list of detail items to be included in the symbol group.
The method pfcDetailSymbolGroupInstructions::GetName returns the name of the symbol group.
The method pfcDetailSymbolGroupInstructions::SetName assigns the name of the symbol group.
Detail Symbol Group Information
Methods Introduced:
The method pfcDetailSymbolGroup::GetInstructions returns the pfcDetailSymbolGroupInstructions data object that describes how to construct a symbol group.
The method pfcDetailSymbolGroup::GetParentGroup returns the parent symbol group to which a given symbol group belongs.
The method pfcDetailSymbolGroup::GetParentDefinition returns the symbol definition of a given symbol group.
The method pfcDetailSymbolGroup::ListChildren lists the subgroups of a given symbol group.
The method pfcDetailSymbolDefItem::ListSubgroups lists the subgroups of a given symbol group stored in the symbol definition at the indicated level.
The method pfcDetailSymbolDefItem::IsSubgroupLevelExclusive identifies if the subgroups of a given symbol group stored in the symbol definition at the indicated level are exclusive or independent. If groups are exclusive, only one of the groups at this level can be active in the model at any time. If groups are independent, any number of groups can be active.
The method pfcDetailSymbolInstItem::ListGroups lists the symbol groups included in a symbol instance. The pfcSymbolGroupFilter argument determines the types of symbol groups that can be listed. It takes the following values:
•  pfcDTLSYMINST_ALL_GROUPS—Retrieves all groups in the definition of the symbol instance.
•  pfcDTLSYMINST_ACTIVE_GROUPS—Retrieves only those groups that are actively shown in the symbol instance.
•  pfcDTLSYMINST_INACTIVE_GROUPS—Retrieves only those groups that are not shown in the symbol instance.
Detail Symbol Group Operations
Methods Introduced:
The method pfcDetailSymbolGroup::Delete deletes the specified symbol group from the symbol definition. This method does not delete the entities contained in the group.
The method pfcDetailSymbolGroup::Modify modifies the specified symbol group based on the pfcDetailSymbolGroupInstructions data object that contains information about the modifications that can be made to the symbol group.
The method pfcDetailSymbolDefItem::CreateSubgroup creates a new subgroup in the symbol definition at the indicated level below the parent group.
The method pfcDetailSymbolDefItem::SetSubgroupLevelExclusive makes the subgroups of a symbol group exclusive at the indicated level in the symbol definition.
Note
After you set the subgroups of a symbol group as exclusive, only one of the groups at the indicated level can be active in the model at any time.
The method pfcDetailSymbolDefItem::SetSubgroupLevelIndependent makes the subgroups of a symbol group independent at the indicated level in the symbol definition.
Note
After you set the subgroups of a symbol group as independent, any number of groups at the indicated level can be active in the model at any time.
Detail Attachments
A detail attachment in Creo Object TOOLKIT C++ is represented by the interface pfcAttachment. It is used for the following tasks:
•  The way in which a drawing note or a symbol instance is placed in a drawing.
•  The way in which a leader on a drawing note or symbol instance is attached.
Method Introduced:
The method pfcAttachment::GetType returns the pfcAttachmentType object containing the types of detail attachments. The detail attachment types are as follows:
•  pfcATTACH_FREE—The attachment is at a free point possibly with respect to a given drawing view.
•  pfcATTACH_PARAMETRIC—The attachment is to a point on a surface or an edge of a solid.
•  pfcATTACH_OFFSET—The attachment is offset to another drawing view, to a model item, or to a 3D model annotation.
•  pfcATTACH_TYPE_UNSUPPORTED—The attachment is to an item that cannot be represented in PFC at the current time. However, you can still retrieve the location of the attachment.
Free Attachment
The pfcATTACH_FREE detail attachment type is represented by the interface pfcFreeAttachment. It is a child of the pfcAttachment interface.
Methods Introduced:
The method pfcFreeAttachment::GetAttachmentPoint returns the attachment point. This location is in screen coordinates for drawing items, symbol instances and surface finishes on flat-to-screen annotation planes, and in model coordinates for symbols and surface finishes on 3D model annotation planes.
The method pfcFreeAttachment::SetAttachmentPoint sets the attachment point.
The method pfcFreeAttachment::GetView returns the drawing view to which the attachment is related. The attachment point is relative to the drawing view, that is the attachment point moves when the drawing view is moved. This method returns a NULL value, if the detail attachment is not related to a drawing view, but is placed at the specified location in the drawing sheet, or if the attachment is offset to a model item or to a 3D model annotation.
The method pfcFreeAttachment::SetView sets the drawing view.
Parametric Attachment
The pfcATTACH_PARAMETRIC detail attachment type is represented by the interface pfcParametricAttachment. It is a child of the pfcAttachment interface.
Methods Introduced:
The method pfcParametricAttachment::GetAttachedGeometry returns the pfcSelection object representing the item to which the detail attachment is attached. This includes the drawing view in which the attachment is made.
The method pfcParametricAttachment::SetAttachedGeometry assigns the pfcSelection object representing the item to which the detail attachment is attached. This object must include the target drawing view. The attachment will occur at the selected parameters.
Offset Attachment
The pfcATTACH_OFFSET detail attachment type is represented by the interface pfcOffsetAttachment. It is a child of the pfcAttachment interface.
Methods Introduced:
The method pfcOffsetAttachment::GetAttachedGeometry returns the pfcSelection object representing the item to which the detail attachment is attached. This includes the drawing view where the attachment is made, if the offset reference is in a model.
The method pfcOffsetAttachment::SetAttachedGeometry assigns the pfcSelection object representing the item to which the detail attachment is attached. This can include the drawing view. The attachment will occur at the selected parameters.
The method pfcOffsetAttachment::GetAttachmentPoint returns the attachment point. This location is in screen coordinates for drawing items, symbol instances and surface finishes on flat-to-screen annotation planes, and in model coordinates for symbols and surface finishes on 3D model annotation planes. The distance from the attachment point to the location of the item to which the detail attachment is attached is saved as the offset distance.
The method pfcOffsetAttachment::SetAttachmentPoint sets the attachment point in screen coordinates.
Unsupported Attachment
The pfcATTACH_TYPE_UNSUPPORTED detail attachment type is represented by the interface pfcUnsupportedAttachment. It is a child of the pfcAttachment interface.
Methods Introduced:
The method pfcUnsupportedAttachment::GetAttachmentPoint returns the attachment point. This location is in screen coordinates for drawing items, symbol instances and surface finishes on flat-to-screen annotation planes, and in model coordinates for symbols and surface finishes on 3D model annotation planes.
The method pfcUnsupportedAttachment::SetAttachmentPoint assigns the attachment point in screen coordinates.