beautypg.com

Connecting tags to an object’s methods, Connecting tags to an activex object’s events – Rockwell Automation FactoryTalk View Site Edition Users Guide User Manual

Page 530

background image

F

ACTORY

T

ALK

V

IEW

S

ITE

E

DITION

U

SER

S

G

UIDE

18–26

• •

Connecting tags to an object’s methods

A method is an action the ActiveX object can perform.

Methods are part of the object. You can:

View a list of the object’s methods.

Find documentation for the object’s methods.

Use the Invoke command to call the object’s methods.

Using the Invoke command to call a method

Use the FactoryTalk View Invoke command to call a method for the named ActiveX
object. With the Invoke command you can:

Assign the value returned by a method to a tag.

Set an object’s property to a tag value or a constant.

Set a tag to the value of an object property.

To specify parameters for the Invoke command, use the Command Wizard. For details
about using the Invoke command, see the FactoryTalk View Site Edition Help.

Connecting tags to an ActiveX object’s events

The ActiveX Control Events dialog box shows the events associated with the selected
ActiveX object. In the dialog box, you can specify FactoryTalk View commands or
macros that will run when an event occurs at run time.

You can also use VBA code to make an ActiveX object’s properties, methods, and events
interact with FactoryTalk View SE. For VBA code examples, see the FactoryTalk View
Site Edition Help.

To view an ActiveX object’s events

Right-click the object, and then select ActiveX Events.

To use the Invoke command to interact with an ActiveX object, the object must have a name.