Category Windows and views, Object ProWindow

Function ProObjectwindowMdlnameCreate


Description
Retrieves a window and attaches the object to it. If the window is already open with the object attached, the function returns the window identifier. If there is an empty window up, the function attaches the object to it. Otherwise, the function creates a new window and attaches the object to it.

NOTE:

This function should be used only when the application must display more than one object simultaneously. Under normal circumstances, use ProMdlDisplay() to show an object in the current or base window. This function should be used on model present in the session. Note: In Creo 3 this function does not support names longer than 80 characters. It will return PRO_TK_BAD_INPUTS for longer names. The support for ProMdlName will be added in a future release.

Replacement in Object TOOLKIT: pfcBaseSession::CreateModelWindow
pfcBaseSession::OpenFile
wfcWSession::OpenSource
Synopsis
#include <ProWindows.h>
ProErrorProObjectwindowMdlnameCreate(
ProMdlName object_name
/* (In)
The name of the object to be retrieved
*/
ProType object_type
/* (In)
The type of the object (PRO_PART, PRO_ASSEMBLY, PRO_CATIA_PART, PRO_SW_ASSEM and so on)
*/
int* p_window_id
/* (Out)
The window identifier in which the object was retrieved
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully retrieved the window and attached the object to it.
PRO_TK_INVALID_TYPEYou specified an invalid object type.
PRO_TK_BAD_INPUTSEither you specified an invalid object name, or the window identifier is NULL.
PRO_TK_E_DEADLOCKThe Creo Parametric user interface is not prepared to handle this request (because it is blocked by another process such as an OLE container activation).
PRO_TK_E_NOT_FOUNDThe application is trying to open an embedded model (that is, a model representing a single body of a multi-body foreign object) in a separate window. This operation is not supported.

Manual References:

  1. Pro/DEVELOP to Creo Toolkit Function Mapping: Equivalent Pro/DEVELOP Functions
  2. User Interface: Basic Graphics: Creating and Removing Windows
  3. User Interface: Basic Graphics: Creating and Removing Windows
  4. Core: Solids, Parts, and Materials: Displaying a Solid
  5. Working with Multi-CAD Models Using Creo Unite: Working with Basic Graphics
  6. Working with Multi-CAD Models Using Creo Unite: Functions that Support Multi-CAD Assemblies
  7. Working with Multi-CAD Models Using Creo Unite: Superseded Functions
  8. Working with Multi-CAD Models Using Creo Unite: Restrictions on Character Length for Multi-CAD Functions

Sample Code References:

  1. pt_async ( TestAsync.c )
  2. pt_async ( TestAsync.c )
  3. pt_examples ( TestDbms.c )
  4. pt_examples ( TestImportfeat.c )
  5. pt_examples ( TestFamTab.c )
  6. pt_examples ( UtilTree.c )
  7. pt_userguide ( UgSolidLoadDisp.c )