Documentation de l'API > Windows and views > Object ProAccessorywindow > Function ProAccessorywindowWithTreeMdlnameCreate
Function ProAccessorywindowWithTreeMdlnameCreate
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. The window created is smaller than the one created by ProObjectwindowMdlnameCreate(). This window doesn't have the toolbar. It doesn't allow any options and has restricted options under Windows menu.
NOTE:
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:
Synopsis
#include <ProWindows.h>
ProAccessorywindowWithTreeMdlnameCreate
(
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)
*/
ProBoolean tree_flag
/* (In)
if PRO_B_TRUE enables model tree or disables otherwise.
*/
int* p_window_id
/* (Out)
The window identifier in which the object was retrieved
*/
)
Returns
The function successfully retrieved the window and attached the object to it.
You specified an invalid object type.
Either you specified an invalid object name, or the window identifier is NULL.
The 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.
Sample Code References
User Guide References
Est-ce que cela a été utile ?