The following examples demonstrate creating index operation expressions.
Clears all previous index operation expressions.
struct resbuf* pIndexParamsRb = acutBuildList(RTNIL, 0);
ade_dwgindexdef("", 0, pIndexParamsRb);
Specifies that the location index is to be generated.
struct resbuf* pIndexParamsRb = acutBuildList(RTNIL, 0);
ade_dwgindexdef("Location", 1, pIndexParamsRb);
Specifies that the location index is to be removed.
struct resbuf* pIndexParamsRb = acutBuildList(RTNIL, 0);
ade_dwgindexdef("Location", 0, pIndexParamsRb);
Specifies that the property index is to be generated.
struct resbuf* pIndexParamsRb = acutBuildList(RTNIL, 0);
ade_dwgindexdef("Property", 1, pIndexParamsRb);
Specifies that the property index is to be removed.
struct resbuf* pIndexParamsRb = acutBuildList(RTNIL, 0);
ade_dwgindexdef("Property", 0, pIndexParamsRb);
Object Data Indexes
If the indexParams argument is RTNIL, then indexes will be generated or removed for all tables and fields, for example:
Specifies that an object data index be generated on all tables and all fields.
struct resbuf* pIndexParamsRb = acutBuildList(RTNIL, 0);
ade_dwgindexdef("ObjData", 1, pIndexParamsRb);
Specifies that all object data indexes for all tables and all fields be removed.
struct resbuf* pIndexParamsRb = acutBuildList(RTNIL, 0);
ade_dwgindexdef("ObjData", 0, pIndexParamsRb);
If the indexParams argument includes only a table name with no field names specified, then indexes will be generated or removed for all fields in the table, for example:
Specifies that an object data index be generated on all fields in table TABLE.
struct resbuf* pOdIndexParamsRb = acutBuildList(
RTLB,
RTLB,
RTSTR, "TABLE",
RTLE,
RTLE,
0);
ade_dwgindexdef("ObjData", 1, pOdIndexParamsRb);
Specifies that all object data indexes be removed from on all fields in table TABLE.
struct resbuf* pOdIndexParamsRb = acutBuildList(
RTLB,
RTLB,
RTSTR, "TABLE",
RTLE,
RTLE,
0);
ade_dwgindexdef("ObjData", 0, pOdIndexParamsRb);
The list of fields in the indexParams argument can contain one or more fields, for example:
Specifies that an object data index be generated on field FIELD1 in table TABLE.
struct resbuf* pOdIndexParamsRb = acutBuildList(
RTLB,
RTLB,
RTSTR, "TABLE",
RTSTR, "FIELD1",
RTLE,
RTLE,
0);
ade_dwgindexdef("ObjData", 1, pOdIndexParamsRb);
Specifies that an object data index be removed from field FIELD1 in table TABLE.
struct resbuf* pOdIndexParamsRb = acutBuildList(
RTLB,
RTLB,
RTSTR, "TABLE",
RTSTR, "FIELD1",
RTLE,
RTLE,
0);
ade_dwgindexdef("ObjData", 0, pOdIndexParamsRb);
Specifies that an object data index be generated on fields FIELD1 and FIELD2 in table TABLE.
struct resbuf* pOdIndexParamsRb = acutBuildList(
RTLB,
RTLB,
RTSTR, "TABLE",
RTSTR, "FIELD1",
RTSTR, "FIELD2",
RTLE,
RTLE,
0);
ade_dwgindexdef("ObjData", 1, pOdIndexParamsRb);
Specifies that an object data index be removed from fields FIELD1 and FIELD2 in table TABLE.
struct resbuf* pOdIndexParamsRb = acutBuildList(
RTLB,
RTLB,
RTSTR, "TABLE",
RTSTR, "FIELD1",
RTSTR, "FIELD2",
RTLE,
RTLE,
0);
ade_dwgindexdef("ObjData", 0, pOdIndexParamsRb);
It is also valid to pass multiple table field lists through the indexParams parameter, for example:
Specifies creating object data indexes on all fields in TABLE1 and on FIELD1 in table TABLE2.
struct resbuf* pOdIndexParamsRb = acutBuildList(
RTLB,
RTLB,
RTSTR, "TABLE1",
RTLE,
RTLB,
RTSTR, "TABLE2",
RTSTR, "FIELD1",
RTLE,
RTLE,
0);
ade_dwgindexdef("ObjData", 1, pOdIndexParamsRb);
Specifies deleting object data indexes from all fields in TABLE1 and from FIELD1 in table TABLE2.
struct resbuf* pOdIndexParamsRb = acutBuildList(
RTLB,
RTLB,
RTSTR, "TABLE1",
RTLE,
RTLB,
RTSTR, "TABLE2",
RTSTR, "FIELD1",
RTLE,
RTLE,
0);
ade_dwgindexdef("ObjData", 0, pOdIndexParamsRb);


