HI,
I want to select the objects in the curent drawing which have a specific field value. The table name is "TABLE", and filed name is "FIELD" and the value is "VALUE". In my test drawing, there are two polygons with this table and value.
I use the following codes.
To define the query:
(ade_qrydefine '("" "" "" "Data" ("objdata" "TABLE.FIELD" "=" "VALUE")""))
To execute the query and get the selection set of objects:
(ade_prefsetval "MkSelSetWithQryObj" T)
(if (> (ade_qryexecute) 0.0)
(setq queried_objects (ssget "P"))
(princ "\nNo objects found.")
)
But I am getting at command prompt,
0 object(s) have been queried
and the selection set is empty.
Why I am not getting any objects in query? where is the mistake?
Any help in this regard will be highly appreciated.
Thanks
Rajesh
Have you attach the drawing to query ?
You need to attach the drawing (ade_dsattach) to query the objects.
(ade_dsattach "dwg_drive:\\mydrawing.dwg"))