API 文件集 > Miscellaneous > Object ProDisp > Function ProDispObjectAttach
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>
ProDispObjectAttach
(
int window
/* (In)
Identifier of window in which ProDispObject will be attached to Creo scene.
*/
/* (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
The function succeeded
Parent (attach point) doesn't exist
new_key for ProDispObject is already in use.
Invalid input arguments (bad window or NULL display object)
One or more input arguments was invalid
Function is not supported on given window(because it is 2D window, like drawing or sketcher).
Sample Code References
這是否有幫助?