ade_qrysettype

AutoCAD Map 3D AutoLISP

Up a level
ade_qrysettype
 
 

Sets the query mode: Preview, Draw, or Report.

(ade_qrysettype qrytype [multiline templ filename])

Returns T or nil.

qrytype Query mode (string): "preview", "draw", or "report", where "preview" = Display queried objects without retrieving them, similar to Quick View, "draw" = Get queried objects from source drawings or external databases and copy to the project drawing, and "report" = Direct queried information to an output file.
multiline Whether to write report rows for sub-objects: T or nil, where T = Write report rows for sub-objects (objects such as vertices of polylines and attributes of blocks), and nil = Write lines for top-level objects only. Relevant only if qrytype is "report".
templ> Ordered list of object properties to report (string). Each list element defines a report column. For example, ".type,.layer". Relevant only if qrytype is "report".
filename Path and file name of the output file (string). Relevant only if qrytype is "report".

This function affects the current query.

The three optional parameters, multiline, templ, and filename, are relevant only if the query mode is "report". If the query mode is "preview" or "draw", omit them.

The following example sets the query mode to Report.

(ade_qrysettype "report" T ".type,.layer" "output.txt")