GetDevPaperBinName

<< Click to Display Table of Contents >>

Navigation:  Device Control Properties >

GetDevPaperBinName

Previous pageReturn to chapter overviewNext page

[Windows platform only; not supported by PHP and the Community Edition]

Returns the paper bin name specified by "index" of the currently selected output device.  If index is out of range, an empty string ("") will be returned. This method only works correctly if you called DevEnumPaperBins() before.

method string VPE.GetDevPaperBinName(

long Index

)

long Index

must be in the range between 0 and the value returned by DevEnumPaperBins() - 1

Returns:

the Paper Bin name

Remarks:

In case of an error, LastError is set to VERR_COMMON. This method only works correctly if you called DevEnumPaperBins() before.

Example:

long count, i

string s

count = Doc.DevEnumPaperBins() - 1        // initialize enumeration

for i = 0 to count

 s = Doc.GetDevPaperBinName(i)

 MessageBox(s)   // show each available bin in a separate message box

next i

 

Do not call DevEnumPaperBins() repeatedly, because each time VPE will query all available paper bins of the currently selected output device from the system.

WRONG EXAMPLE:

long i

string s

for i = 0 to Doc.DevEnumPaperBins() - 1

  s = Doc.GetDevPaperBinName(i)

  MessageBox(s)   // show each available bin in a separate message box

next i