External Interfaces/API Reference |
Retrieve a property value from an interface or get a list of properties
Syntax
Arguments
h
Handle for a COM object previously returned from actxcontrol
, actxserver
, get
, or invoke
.
propertyname
A string that is the name of the property value to be retrieved.
Description
Returns the value of the property specified by propertyname
. If no property is specified, then get
returns a list of all properties for the object or interface.
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. See Converting Data in the External Interfaces documentation for a description of how MATLAB converts COM data types.
Examples
Create a COM server running Microsoft Excel:
Retrieve a single property value:
Retrieve a list of all properties for the CommandBars
interface:
c = get(e, 'CommandBars'); get(c) ans = Application: [1x1 Interface.excel.application.CommandBars.Application] Creator: 1.4808e+009 ActionControl: [] ActiveMenuBar: [1x1 Interface.excel.application.CommandBars.ActiveMenuBar] Count: 94 DisplayTooltips: 1 DisplayKeysInTooltips: 0 LargeButtons: 0 MenuAnimationStyle: 'msoMenuAnimationNone' Parent: [1x1 Interface.excel.application.CommandBars.Parent] AdaptiveMenus: 0 DisplayFonts: 1
See Also
set
, inspect
, isprop
, addproperty
, deleteproperty
fieldnames | inspect |