Application Query Options

Below is a list of request functions can provide with the help of the APPLICATION_QUERY command.
These request options are given in the extension_name and the parameter_string parameter of the command.
Note, that the query options and return values of an APPLICATION_QUERY may vary according to the execution context.

Compatibility up to ARCHICAD 19: the use of the listed application queries in parameter scripts (or master scripts run as parameter script) could result in unreliable returned values, and causes GDL warnings.Compatibility starting from ARCHICAD 20: the listed queries cause warnings in parameter scripts, and the return value is either 0 or empty string, according to variable type.

The above restriction applies to:

“document_feature”

Document feature

This command can return features of the active document/view.
Currently there is only one feature it can return – the view direction of the document.
These type of queries are restricted from the parameter script and cause GDL warnings.

View direction

n = APPLICATION_QUERY ("document_feature", "view_direction", type)

This command returns the viewing direction of the current document type in which the object is being visualized.
This command has no additional parameters.

type: Returned type values:

"vertical_only": for floor plan

"horizontal_only": for section and elevation generated from 3D (not when the object is placed into a S/E)

"free": for 3D and 3D document

"none"

"unset"

MEP System

This command returns MEP system types and information about MEP systems.
It has more functions which can be addressed via the parameter_string parameter:

First Occasion in Progress

This command returns whether the current run is the first run
or a consequence of a previous execution of the parameter script which changed some parameters.
This command has no additional parameters.

The distinction may be important when a part of the parameter script executes a triggered event
– e.g. it handles the pushing of a function button.

isFirstRun: The returned value shows whether the current run is the first run

Tags and Categories

These commands return the folder names, parameter names and parameter values of “Tags and Categories” tabpage.
The order of parameters is the same as on the tabpage.
There are two possible extension_names in these commands:

User image files

This command returns the list of user-provided image file names loaded with the active libraries (image files which are not in the dedicated folders with
names containing [TImg]*, [BImg]*, [UImg]*, or [HImg]*)