-
-
Notifications
You must be signed in to change notification settings - Fork 262
/
Copy pathblock_control.c
31 lines (28 loc) · 998 Bytes
/
block_control.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#define DWG_TYPE DWG_TYPE_BLOCK_CONTROL
#include "common.c"
void
api_process (dwg_object *obj)
{
int error, isnew;
BITCODE_BS i, num_entries;
BITCODE_H *entries, *hdls;
BITCODE_H model_space;
BITCODE_H paper_space;
dwg_obj_block_control *block_control = dwg_object_to_BLOCK_CONTROL (obj);
CHK_ENTITY_TYPE_W_OBJ (block_control, BLOCK_CONTROL, num_entries, BS);
entries = dwg_object_tablectrl_get_entries (obj, &error);
if (!dwg_dynapi_entity_value (block_control, "BLOCK_CONTROL", "entries",
&hdls, NULL))
fail ("BLOCK_CONTROL.entries");
for (i = 0; i < num_entries; i++)
{
if (hdls[i] == entries[i])
ok ("BLOCK_CONTROL.entries[%d]: " FORMAT_REF, i,
ARGS_REF (entries[i]));
else
fail ("BLOCK_CONTROL.entries[%d]: " FORMAT_REF, i,
ARGS_REF (entries[i]));
}
CHK_ENTITY_H (block_control, BLOCK_CONTROL, model_space);
CHK_ENTITY_H (block_control, BLOCK_CONTROL, model_space);
}