Main Content

ObjectVisibility

Control access to instrument object

Description

The ObjectVisibility property provides a way for application developers to prevent end-user access to the instrument objects created by their application. When an object's ObjectVisibility property is set to off, instrfind and instrreset do not return or delete those objects.

Objects that are not visible are still valid. If you have access to the object (for example, from within the file that creates it), then you can set and get its properties and pass it to any function that operates on instrument objects.

Characteristics

Usage

Any instrument object

Read only

Never

Data type

Character vector

Values

Default value is enclosed in braces ({}).

{on}

Object is visible to instrfind and instrreset

off

Object is not visible from the command line (except by instrfindall)

Examples

The following statement creates an instrument object with its ObjectVisibility property set to off:

g = gpib('mcc',0,2,'ObjectVisibility','off');
instrfind
ans =
     []

However, since the object is in the workspace (g), you can access it.

g.ObjectVisibility
ans =

	off

See Also