Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Contents

get (COM)

Get property value from interface, or display properties

Syntax

V = h.get
V = h.get('propertyname')
V = get(h,...)

Description

V = h.get returns a list of all properties and their values for the object or interface, h.

If V is empty, either there are no properties in the object, or the MATLAB® software cannot read the object's type library. Refer to the COM vendor's documentation. For Automation objects, if the vendor provides documentation for a specific property, use the V = get(h,...) syntax to call it.

V = h.get('propertyname') returns the value of the property specified in the string, propertyname.

V = get(h,...) is an alternate syntax for the same operation.

Examples

Create a COM server running Microsoft® Excel® software:

e = actxserver ('Excel.Application');

Retrieve a single property value:

e.Path

Depending on your spreadsheet program, MATLAB software displays:

ans =
   C:\Program Files\MSOffice\OFFICE11

Retrieve a list of all properties for the CommandBars interface:

c = e.CommandBars.get

MATLAB displays information similar to the following:

c = 
                    Application: [1x1 
Interface.Microsoft_Excel_11.0_Object_Library._Application]
                        Creator: 1.4808e+009
                  ActionControl: []
                  ActiveMenuBar: [1x1 
Interface.Microsoft_Office_12.0_Object_Library.CommandBar]
                          Count: 129
                DisplayTooltips: 1
          DisplayKeysInTooltips: 0
                   LargeButtons: 0
             MenuAnimationStyle: 'msoMenuAnimationNone'
                         Parent: [1x1 
Interface.Microsoft_Excel_11.0_Object_Library._Application]
                  AdaptiveMenus: 0
                   DisplayFonts: 1
               DisableCustomize: 0
    DisableAskAQuestionDropdown: 0

More About

expand all

Tips

The meaning and type of the return value is dependent upon the specific property being retrieved. The object's documentation should describe the specific meaning of the return value. MATLAB may convert the data type of the return value. For a description of how MATLAB converts COM data types, see Handling COM Data in MATLAB Software.

COM functions are available on Microsoft Windows® systems only.

See Also

| | | |

Was this topic helpful?