Object ProDisp

Function ProDispObjectAttach


Description
Attach a display object to creo scene. Once attached display object will be rendered along with rest of creo graphics. If scene is regenerated i.e. creo scene graph is recreated for some reason, application must reattach them. This API is only for 3d mode (part/assembly etc) and won't work in 2D (drawings, sketch, CE).
Synopsis
#include <ProDispObject.h>
ProErrorProDispObjectAttach(
int window
/* (In)
Identifier of window in which ProDispObject will be attached to Creo scene.
*/
ProDispObject obj
/* (In)
Display object which will be attached to creo scene
*/
int* key_list
/* (In)
ProArray containing member identifier table of the component to which the display object will be attached. If the display object is to be attached on top level component this should be NULL.
*/
int new_key
/* (In)
a unique(in the scope of key_list) identifier for the new node which will contain the display object.
*/
ProMatrix transform
/* (In)
transform from the parent(specified by key list) to the new object node
*/
)
Returns
PRO_TK_NO_ERRORThe function succeeded
PRO_TK_E_NOT_FOUNDParent (attach point) doesn't exist
PRO_TK_NOT_VALIDnew_key for ProDispObject is already in use.
PRO_TK_BAD_INPUTSInvalid input arguments (bad window or NULL display object)
PRO_TK_GENERAL_ERROROne or more input arguments was invalid
PRO_TK_UNSUPPORTEDFunction is not supported on given window(because it is 2D window, like drawing or sketcher).

Manual References:

  1. User Interface: Basic Graphics: Creating 3D Shaded Data for Rendering
  2. User Interface: Basic Graphics: Creating 3D Shaded Data for Rendering

Sample Code References:

  1. pt_examples ( TestDispObject.c )
  2. pt_examples ( TestDispObject.c )