formZ SDK | 4.0 Call Back Reference | Object Type

# fz_otyp_cbak_copy_cntl_objts

Description

Object type copy control objects function (Optional). if the parametric data of the object has one or more nested control objects, this function needs to be implemented to extract copies of the nested control objects. The function can be called in two modes. The cntrl_objs parameter may be passed in as NULL. In this case, the function only needs to determine how many nested control object there are and pass that value back in the nobj parameter. If cntrl_objs is passed in, it is an array of pointers to already allocated, empty objects, which are ready to be copied into. This MUST be done with the function call :
fz_objt_parm_nested_extract(windex,obj,obj->nested_obj1,cntrl_objs[0]);
fz_objt_parm_nested_extract(windex,obj,obj->nested_obj2,cntrl_objs[1]);
etc.
It is not permitted to copy nested control objects with any of the standard copy API calls, as nested control objects must be independent objects.
Note, that the empty objects are created by formZ and the cntrl_objs array is also allocated by formZ, based on the value of the nobj parameter when this function is called with cntrl_objs passed as NULL.

Plugin Prototype

fzrt_error_td fz_otyp_cbak_copy_cntl_objts(

fzrt_int | windex,
fz_objt_ptr | obj,
fzrt_ptr | parm,
fzrt_int * | nobj,
fz_objt_ptr * | cntrl_objs )

Parameters

windex [Input]

project window index

obj [Input]

object

parm [Input]

generic pointer to the parameter block

nobj [Result]

The number of nested control objects in the parametric object passed in.

cntrl_objs [Input, Result]

An array with pointers to empty objects, into which the nested control objects need to be copied.

Returns

Error codes

Availability

5.0.0.0

Function Set

fz_otyp_cbak_fset

Defined in

fz_otyp_api.h