Category Assembly, Object ProAsmcomp

Function ProAsmcompCreateCopy


DEPRECATED: Since Creo 3
SUPERSEDED BY: ProAsmcompMdlnameCreateCopy
Description
Note: This function is deprecated Use ProAsmcompMdlnameCreateCopy instead. Create a new component in the specified assembly by copying from the specified model. If no model is specified, the new component is created empty. This function either places the new component at a default location in the assembly or leaves it unplaced. This function also initializes the component handle.
Synopsis
#include <ProAsmcomp.h>
ProErrorProAsmcompCreateCopy(
ProAssembly assembly
/* (In)
The specified assembly.
*/
ProName comp_name
/* (In)
The new component name.
*/
ProMdlType comp_type
/* (In)
The new component type; must be either PRO_MDL_ASSEMBLY or PRO_MDL_PART.
*/
ProMdl template_model
/* (In)
Handle to model to be used as a template. If NULL, empty component will be created.
*/
ProBoolean leave_unplaced
/* (In)
If PRO_B_TRUE, the component is left unplaced. If PRO_B_FALSE, the component is placed by default.
*/
ProAsmcomp* p_comp_handle
/* (Out)
Handle to the new component to be initialized.
*/
)
Returns
PRO_TK_NO_ERRORComponent add was successful.
PRO_TK_BAD_INPUTSInvalid name or type for assembly handle or component; or invalid template handle.
PRO_TK_INVALID_TYPETemplate type does not correspond to component type.
PRO_TK_ABORTThe model can not be used as a template or has external dependencies. Copy is aborted.
PRO_TK_GENERAL_ERRORComponent creation failed.
PRO_TK_NOT_VALIDRequired license not found.
PRO_TK_LINE_TOO_LONGcomp_name length of the new component is more than 31 chars.
PRO_TK_UNSUPPORTEDUnsupported model. For instance, models which come from Multi-CAD model approach, are not supported in this release.

Manual References:

  1. Working with Multi-CAD Models Using Creo Unite: Superseded Functions
  2. Technical Summary of Changes for Creo 4.0 F000: Assembly