Listing Drawing Views
Functions Introduced:
• ProDrawingViewsCollect()
• ProDrawingViewVisit()
• ProDrawingViewSheetGet()
• ProDrawingErasedviewSheetGet()
• ProDrawingViewOutlineGet()
• ProDrawingViewTypeGet()
• ProDrawingViewIdGet()
• ProDrawingViewInit()
• ProDrawingViewonlyOpen()
• ProDrawingViewParentGet()
• ProDrawingViewSegmentedLeaderGet()
• ProDrawingViewChildrenGet()
• ProDrawingViewOriginGet()
• ProDrawingViewAlignmentGet()
• ProDrawingViewScaleIsUserdefined()
• ProDrawingViewScaleGet()
• ProDrawingScaleGet()
• ProDrawingViewPerspectiveScaleGet()
• ProDrawingViewFlagGet()
• ProDrawingViewDisplayGet()
• ProDrawingViewColorSourceGet()
• ProDrawingViewSolidGet()
• ProDrawingViewTransformGet()
• ProDrawingViewNameGet()
• ProDrawingViewZclippingGet()
• ProDrawingViewDatumdisplayGet()
• ProDrawingViewPipingdisplayGet()
• ProDrawingViewIsErased()
• ProDrawingViewNeedsRegen()
• ProDrawingViewXhatchDependentGet()
ProDrawingViewsCollect() outputs an array of ProView handles to all the views in a drawing. ProDrawingViewVisit() is an alternative way to find the views, and conforms to the usual form of visit functions. ProDrawingViewSheetGet() outputs the number of the sheet in which a specified view appears.
The function ProDrawingErasedviewSheetGet() outputs the number of the sheet, which contained the view that was erased. If the sheet that contained the erased view is deleted, the sheet ID is returned as PRO_VALUE_UNUSED.
The function ProDrawingViewOutlineGet() outputs the position of the view in the sheet.
The function ProDrawingViewTypeGet() returns the type of a specified drawing view. A drawing view can be of the following types:
• PRO_VIEW_GENERAL—Specifies a general drawing view.
• PRO_VIEW_PROJECTION—Specifies a projected drawing view.
• PRO_VIEW_AUXILIARY—Specifies an auxiliary drawing view.
• PRO_VIEW_DETAIL—Specifies a detailed drawing view.
• PRO_VIEW_REVOLVE—Specifies a revolved drawing view.
• PRO_VIEW_COPY_AND_ALIGN—Specifies a copy and align drawing view.
• PRO_VIEW_OF_FLAT_TYPE—Specifies a flat type drawing view.
The function ProDrawingViewIdGet() retrieves the ID of the drawing view specified by the drawing and the drawing view handles.
The function ProDrawingViewInit() retrieves the drawing view handle based on the specified drawing handle and the view ID.
The function ProDrawingViewonlyOpen() opens a drawing in the view only mode.
The function ProDrawingViewParentGet() returns the parent view of a specified drawing view.
The function ProDrawingViewSegmentedLeaderGet() returns the leader view of a segmented (total unfold) view.
The function ProDrawingViewChildrenGet() returns the child views of a drawing view and the total number of children.
ProDrawingViewOriginGet() returns the location of the origin in terms of the ProPoint3d object and the selection reference in terms of the ProSelection object for a specified drawing view.
ProDrawingViewAlignmentGet() returns the alignment of a drawing view with respect to another view. It returns the alignment style of the drawing view that can be either horizontal or vertical, the reference view to which the view is aligned, and the alignment references of both the aligned and reference views.
ProDrawingViewScaleIsUserdefined() returns a boolean value depending on whether the drawing has a user-assigned scale or not.
ProDrawingViewScaleGet() returns the scale factor applied, even if the view is not a scaled view. ProDrawingScaleGet() returns the overall drawing scale that is applied to all unscaled views.
The function ProDrawingViewPerspectiveScaleGet() returns the perspective scale applied to a drawing view. This scale option is available only for general views. The function returns the following output arguments:
• eye_dist—Specifies the eye-point distance from model space.
• view_dia—Specifies the view diameter in paper units such as mm.
The function ProDrawingViewFlagGet() identifies if the projection arrow flag has been set for a projected or detailed drawing view.
ProDrawingViewDisplayGet() outputs the ProDrawingViewDisplay structure that describes the display status of the drawing view. The fields in the structure, all either enums or booleans, are listed below:
• style—Whether wireframe, hidden line, or shaded.
• quilt_hlr—Whether hidden-line-removal is applied to quilts.
• tangent_edge_display—Style of line used for tangent edges.
• cable_display—Whether cables are shown by centerline, as thick, or using the current default.
• concept_model—Whether the skeleton is displayed.
• weld_xsec—Whether welds are included in the cross-section.
ProDrawingViewColorSourceGet() returns the color source of the drawing view representation. The color source can be of the following types:
• PRO_VIEW_MODEL_COLOR—Specifies that the drawing colors are determined by the model settings.
• PRO_VIEW_DRAWING_COLOR—Specifies that the drawing colors are determined by the drawings settings.
ProDrawingViewSolidGet() provides the handle to the solid that is being displayed in the drawing view. ProDrawingViewTransformGet() returns the matrix that describes the transform between 3D solid coordinates and 2D screen coordinates for a specified view.
ProDrawingViewNameGet() returns the name of a specified view in the drawing.
ProDrawingViewZclippingGet() returns 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 function ProDrawingViewDatumdisplayGet() determines if a solid model datum has been explicitly shown in a particular drawing view.
The function ProDrawingViewPipingdisplayGet() returns the piping display option for a drawing view.
The function ProDrawingViewIsErased() identifies if the drawing view is erased or not.
The function ProDrawingViewNeedsRegen() identifies whether the drawing or the specified drawing view needs to be regenerated.
The function ProDrawingViewXhatchDependentGet() checks if the section hatching is dependent on the parent view. The input arguments are listed below:
• drawing—Specify the drawing using the ProDrawing handle.
• view—Specify the view using the ProView handle.
The output argument is_dep returns PRO_B_TRUE if dependent on the parent view using the ProBoolean object.
Example 5: Listing the Views in a Drawing
The sample code in the file UgDrawingViews.c located at <creo_toolkit_loadpoint>/protk_appls/pt_userguide/ptu_drawing shows a command that creates an information window reporting information about all the views in a drawing.