Kernel 8.0 APIs Banner
Office of Information and Technology (OIT) Banner
[skip navigation]

DEVICE^XUDHGUI(): GUI Device Lookup

Reference Type: Supported, Category: Device Handler, ICR#: 3771

Description

The DEVICE^XUDHGUI API allows VistA Graphical User Interface (GUI)-based applications to look up devices. This API retrieves the first 20 devices that meet the specifications passed.

NOTE: This API was made available with Kernel Patch XU*8.0*220.

Format

  DEVICE^XUDHGUI(.list,starting_point[,direction][,right_margin_range])

Input Parameters

.list:

(required) Named array to store output.

starting_point:

(required) This parameter indicates where to start the $ORDERing of the Global.

  • P—Returns devices whose name starts with P.

  • P*—Returns up to 20 devices the first starting with P.
direction:

(optional) This parameter indicates whether to $ORDER up or down from the starting_point parameter. The acceptable values are 1 and -1:

  • 1—Up

  • -1—Down
right_margin_range:

(optional) This parameter is used to specify a width range of devices:

  • Exact Width (e.g., "132-132")

  • At Least Width (e.g., "132")

  • Range (e.g., "80-132")

Output Parameters

.list:

The data is returned in this named array. Data is returned in the following format:

  IEN^NAME^DISPLAY NAME^LOCATION^RIGHT MARGIN^PAGE LENGTH

Example 1

This example stores/displays a list of all devices that begin with P in an array (e.g., DEVICES), without passing a direction or right margin range parameter:

>K DEVICES
>D DEVICE^XUDHGUI(.DEVICES,"P")

The DEVICES array displays the following results:

  >ZW DEVICES
DEVICES(1)=358^P-MESSAGE-HFS^P-MESSAGE-HFS^HFS FILE=>MESSAGE^255^256
DEVICES(2)=348^P-MESSAGE-HFS-ONT^P-MESSAGE-HFS-ONT^HFS FILE==> MESSAGE^80^999
DEVICES(3)=274^P-MESSAGE-HFS-VXD^P-MESSAGE-HFS-VXD^HFS FILE==> MESSAGE^80^256
DEVICES(4)=292^P-RESMON^P-RESMON^IRM^132^64
DEVICES(5)=310^P-WINDOC^P-WINDOC^MWI WINDOW DOCUMENT BOX^80^256

 

Example 2

This example stores/displays a list of all devices that begin with P in an array (e.g., DEVICES), without passing a direction parameter but including those devices with a right margin of an exact width of 80:

>K DEVICES
>D DEVICE^XUDHGUI(.DEVICES,"P",,"80-80")

The DEVICES array displays the following results:

  >ZW DEVICES
DEVICES(1)=348^P-MESSAGE-HFS-ONT^P-MESSAGE-HFS-ONT^HFS FILE==> MESSAGE^80^999
DEVICES(2)=274^P-MESSAGE-HFS-VXD^P-MESSAGE-HFS-VXD^HFS FILE==> MESSAGE^80^256
DEVICES(3)=310^P-WINDOC^P-WINDOC^MWI WINDOW DOCUMENT BOX^80^256

Example 3

This example stores/displays a list of all devices that begin with P in an array (e.g., DEVICES), without passing a direction parameter but including those devices with a right margin width range of 80-132:

>K DEVICES
>D DEVICE^XUDHGUI(.DEVICES,"P",,"80-132")

The DEVICES array displays the following results:

  >ZW DEVICES
DEVICES(1)=348^P-MESSAGE-HFS-ONT^P-MESSAGE-HFS-ONT^HFS FILE==> MESSAGE^80^999
DEVICES(2)=274^P-MESSAGE-HFS-VXD^P-MESSAGE-HFS-VXD^HFS FILE==> MESSAGE^80^256
DEVICES(3)=292^P-RESMON^P-RESMON^IRM^132^64
DEVICES(4)=310^P-WINDOC^P-WINDOC^MWI WINDOW DOCUMENT BOX^80^256

Example 4

This example stores/displays a list of up to 20 devices, the first of which starts with P, in an array (e.g., DEVICES), without passing a direction or right margin range parameter:

>K DEVICES
>D DEVICE^XUDHGUI(.DEVICES,"P*")

The DEVICES array displays the following results:

  >ZW DEVICES
DEVICES(1)=358^P-MESSAGE-HFS^P-MESSAGE-HFS^HFS FILE=>MESSAGE^255^256
DEVICES(2)=348^P-MESSAGE-HFS-ONT^P-MESSAGE-HFS-ONT^HFS FILE==> MESSAGE^80^999
DEVICES(3)=274^P-MESSAGE-HFS-VXD^P-MESSAGE-HFS-VXD^HFS FILE==> MESSAGE^80^256
DEVICES(4)=292^P-RESMON^P-RESMON^IRM^132^64
DEVICES(5)=310^P-WINDOC^P-WINDOC^MWI WINDOW DOCUMENT BOX^80^256
DEVICES(6)=202^C6_SDD_MX3 ROUTINE^ROUTINE ^Next to Jean’s Office^80^59
DEVICES(7)=428^SDD DUPLEX P10^SDD DUPLEX P10^SSD DUPLEX PRINTER NEXT TO JACK^80^60
DEVICES(8)=429^SDD P10^SDD P10^Printer next to Jack.^80^60
DEVICES(9)=329^C6_SDD_MX3 P10^SS10 ^Near Jean’s Office^80^59
DEVICES(10)=330^C6_SDD_MX3 P12^SS12 ^Near Jean’s Office^96^57
DEVICES(11)=331^C6_SDD_MX3 P16^SS16 ^Near Jean’s Office^255^58
DEVICES(12)=349^C6_SDD_MX3 P16P8L^SS16P8L ^Near Jean’s Office^117^79
DEVICES(13)=202^C6_SDD_MX3 ROUTINE^SSR ^Next to Jean’s Office^80^59
DEVICES(14)=427^SUP$PRT TEST^SUP$PRT TEST^DISK FILE^132^58
DEVICES(15)=283^SYS$INPUT^SYS$INPUT^SYS$INPUT;^132^64
DEVICES(16)=198^VMS FILE^VMS FILE^DISK^80^64
DEVICES(17)=349^C6_SDD_MX3 P16P8L^VPM ^Near Jean’s Office^117^79
DEVICES(18)=291^VTB255^VTB255^RMS FILE^255^99999
DEVICES(19)=288^ZBROWSE^ZBROWSE^RMS FILE^255^99999