Storing Named Views
Functions Introduced:
• ProViewStore()
• ProViewRetrieve()
• ProViewNamesGet()
• ProViewNameToView()
• ProViewFromModelitemGet()
• ProViewNameLineGet()
• ProViewIdFromNameLineGet()
• ProViewNameSet()
• ProViewDelete()
• ProViewCreate()
The ProViewStore() and ProViewRetrieve() functions enable you to save and use a named view of the solid. They are equivalent to the Creo Parametric > commands Save, and Set in the Saved Views tab, under the Orientation dialog box. You can then select the view you want from the list of view names.
The function ProViewNamesGet() retrieves the names of the views in the specified solid.
The function ProViewNameToView() returns a pointer to the specified view, given the model and view name. Input arguments are:
• model—Specifies the handle to the model whose view is to be retrieved using a ProMdl object.
• view_name—Specifies the name of the view to locate using a ProLine object.
The output argument p_view is the pointer to the view, using a ProView object.
|
Note:
|
The output argument p_view is set if the function returns either PRO_TK_NO_ERROR or PRO_TK_INVALID_ITEM.
|
The function ProViewFromModelitemGet() retrieves the view handle from a model item handle. The model item must be of type PRO_VIEW.
The function ProViewNameLineGet() retrieves the name of the view from the view handle.
The function ProViewIdFromNameLineGet() retrieves the ID of the view. The input arguments are:
• model—Specifies the handle to the part or assembly associated with the drawing, or to the drawing that contains the view. This argument cannot be NULL.
• view_name—Specifies the name of the view. This argument cannot be NULL.
The function ProViewNameSet() sets the name of the view in the specified solid. The inputs arguments are:
• model—Specifies the handle to a part, assembly, or drawing. This argument cannot be NULL.
• p_view—Specifies the handle of the view.
• p_name—Specifies the name of the view.
The function ProViewDelete() deletes the view from the specified solid. The input arguments are:
• model—Specifies the handle to a part, assembly, drawing. This argument cannot be NULL.
• p_view—Specifies the handle of the view.
The function ProViewCreate() creates a new view or provides the specified name to an existing view. The input arguments are:
• model—The handle to a part or assembly.
• view_name—The name of the view that is created in the object database.
The output argument p_view is the handle to the view that is stored and is defined using the ProView object.