4D v13

WR Count

Home

 
4D Write v13
WR Count

WR Count 


 

WR Count ( area ; objectNumber ) -> Function result 
Parameter Type   Description
area  Longint in 4D Write area
objectNumber  Integer in Object number
Function result  Longint in Number of objects

The WR Count command allows you to count the number of occurrences of a specific object in a specific area.

Objects that can be counted are:

ObjectConstantsObjectNumber
Characterswr nb characters0
Wordswr nb words1
Paragraphswr nb paragraphs2
Picture in text flowwr nb pictures in text flow3
Referenceswr nb objects4
Hyphenswr nb soft hyphens5
Page breakswr nb page breaks6
Column breakswr nb column breaks7
Time objectswr nb insertions date time8
Page numberswr nb insertions page number9
Lineswr nb lines10
Pageswr nb pages11
Style sheetswr nb stylesheets12
Images in pages (background)wr nb pictures in page13
Hyperlinkswr nb hyperlinks14 (6.7)
RTF Expressionswr nb RTF expressions15 (6.7)
HTML Expressions wr nb HTML expressions16 (6.7)
  • If objectNumber equals 3, background pictures will be ignored (if you want background pictures to be counted, objectNumber must equal 13).
  • If objectNumber equals 12, WR Count returns the number of style sheets, including the standard style sheets (default style sheet).
  • If objectNumber equals 13 and if an image is repeated in several pages (as selected in the picture properties dialog), the image counts as one.

If you pass a wrong area reference to the command, the error 1022 will be returned.

Example  

 
PROPERTIES 

Product: 4D
Theme: WR Utilities
Number: 89493

 
INDEX

Alphabetical list of commands

 
HISTORY 

Modified: 4D Write 6.7