COUNT
count {<nvar>} {,i=<item>}
{,i=(<item>,<item>...)} {,f=<f_range>}
{,f=(<f_range>,<f_range>...)}
{,m=<i>} {,m=(<n_range>,<n_range>...)}
{,$=<i>} {,$=(<n_range>,<n_range>...)}
{,th=<i>} {,th=(<n_range>,<n_range>...)}
{,font=<i>}
{,font=(<n_range>,<n_range>...)}
{,col=<i>} {,col=(<n_range>,<n_range>...)},
{,til=<i>} {,til=(<n_range>,<n_range>...)},
{,ren=<i>}
{,ren=(<n_range>,<n_range>...)}
{,h=<i>} {,h=(<n_range>,<n_range>...)}
{,class=<text>} {,l=<text>}
{,a<i>=<text>} {,x=<text>}
{,p}
Function
Count the number of items within the model workspace. Particular item types or with particular attributes may be counted.
Parameters
|
nvar |
An arithmetic variable into which the number of counted items is to be recorded. If this is included, it must be the first parameter on the command line. |
|
|
|
|
i= |
Count all items of particular item types. If more than one item type is indicated, they should be enclosed within parentheses. |
|
|
|
|
f= |
Count all items with particular fragment numbers. If more than one fragment range is indicated, they should be enclosed within parentheses. |
|
|
|
|
m= |
Count all items using a particular pen number. A range may be indicated within parentheses. |
|
|
|
|
$= |
Count all items using a particular dash pattern. A range may be indicated within parentheses. |
|
|
|
|
th= |
Count all items using a particular pen thickness. A range may be indicated within parentheses. |
|
|
|
|
font= |
Count all items using a particular character font. A range may be indicated within parentheses. |
|
|
|
|
col= |
Count all items using a particular colour fill. A range may be indicated within parentheses. |
|
|
|
|
til= |
Count all items using a particular tiling pattern. A range may be indicated within parentheses. |
|
|
|
|
ren= |
Count all items using a particular render pattern. A range may be indicated within parentheses. |
|
|
|
|
h= |
Count all items using a particular hatch pattern. A range may be indicated within parentheses. |
|
|
|
|
class= |
Count all submodels with a particular classification code. If <text> is enclosed within quotes it will be a literal code. If not, it will be used as a wild-card code. The <text> code should have a maximum of eight characters. |
|
|
|
|
l= |
Count all submodels with a particular location code. If <text> is enclosed within quotes it will be a literal code. If not, it will be used as a wild-card code. The <text> code should have a maximum of sixteen characters. |
|
|
|
|
a<i> |
Count all items whose attribute <i> is a particular code. If <text> is enclosed within quotes it will be a literal code. If not, it will be used as a wild-card code. |
|
|
|
|
x= |
Count all items who belong to a given index. Either a user index or one of the three system indices BACKGROUND, FOREGROUND, or PARTITION maybe specified. |
|
|
|
|
p |
Count all items in the partition area of the model workspace. If this is omitted, the count will consider all items in the background area. |
Examples
count x, f=(1\10), i=s, h=4
count v1, i=(m,d), a1=dim*
count i=$door*, a5='green'
count v100, class='**'
count m=2, $=5, th=1
Notes
When evaluating which items are to be counted, only items which satisfy all of the conditions will be included.
During wild-card code comparisons, upper and lowercase characters are treated as equal.
See also
attribute, check, classify, fragment, hatch, location, partition, qcheck, tile