![]() |
![]() |
![]() |
![]() |
OMget_array_ref
Synopsis
int OMget_array_ref (OMobj_id object_id,
int ref_index,OMobj_id *ref_id,int mode);Description
OMget_array_ref is used in conjunction with OMget_num_refs to access an objects list of connections as an array. The object specified can be any object that has connections but if the object is not an array object, the ref_index parameter must always be 0.Arguments
object_idref_indexAn array value. AVS/Express uses 0-based indexing; i.e., the index of the first connection in an array is 0.
ref_idmodeThis argument is typically supplied with 0 but the constant OM_REF_SYMBOLIC can be used to obtain the id of a subobject of a by-reference group instead of the id of the subobject of the by-referenced group's value. This is the value that the Network Editor uses to display hierarchical connections properly.
Returned value
The status code (see Return Status ).Examples
With V code specified asgroup a, b, c; group &grp1[] => {a, b, c};and with grp1's object_id in grp1_id, the C code can be used to access the object ids of a, b, and c.OMobj_id grp1_id, ref_id;
int i, num_refs;
grp1_id = ...
if (OMget_num_refs(grp1_id, &num_refs) != 1) num_refs = 0;
for (i = 0; i < num_refs; i++) {
if (OMget_array_ref(grp1_id, i, &ref_id, 0) != 1)
continue;
printf("object is: %s\n",OMret_obj_name(ref_id));
};See Also
![]() |
![]() |
![]() |
![]() |