Text Query Example
Text Query Example
The following function performs two text queries:
- the first places the room ID in all rooms regardless of whether they have an employee.
- the second shows employee information within those rooms that contain one or more employees. This second query is offset in the Y direction so that it does not overwrite the results of the first query.
(defun c:afm_occup ()
(AfmQueryTextInit)
(AfmQueryTextSetAssigned "rm")
(AfmQueryTextAddField "rm.rm_id")
(AfmQueryText 2 "HL-TMP" 5.0 t 0.0 0.0 t "/" nil nil)
(AfmQueryTextInit)
(AfmQueryTextSetOwner "rm")
(AfmQueryTextSetAssigned "em")
(AfmQueryTextAddField "em.em_id")
(AfmQueryText 2 "HL-TMP2" 5.0 t 0.0 -7.5 nil ", " nil nil)
(princ)
)