Version

xamDiagram - Recordable Actions

Topic Overview

Purpose

This topic provides information about recordable actions for testing the XamDiagram control.

XamDiagram Recordable Actions

DropOn

Description

Complete a drag operation by dropping the dragged object on to a specific point in the XamDiagram.

Note
Note:

This will not record if it is the first interaction with the Diagram, while recording prior to dragging on an item, click in the XamDiagram.

Note
Note:

This will also potentially trigger the recording of a ZoomArea and PanArea, if neither were recorded during this record session, this is to make sure the placing is as expected.

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

dX

A double value representing the X location

dY

A double value representing the Y location

Possible exceptions

  • Cannot perform a drop action because the mouse is not currently dragging.

Select

Description

Select, or add to the existing selection of selected diagram items

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

oItemArg

Integer index, string Content Text, or an array of two double values representing X,Y coordinates representing a DiagramConnection or DiagramNode

bAdd

Optional boolean parameter if the item is to be added to the existing selection. The default value is false.

Possible exceptions

  • Selection is not currently enabled.

  • Multi-Selection is not currently enabled.

  • Argument [oItemArg ] is not formatted correctly, format must be [Index, Array of X,Y coords, or string Content]

  • The specified DiagramItem index [oItemArg ] is out of range

  • The following item [oItemArg ] was not found.

  • The following DiagramItem [oItemArg ] key was not found.

ClearSelection

Description

Clear the collection of selected items

Deselect

Deselects the identified item

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

oItemArg

Integer index, string Content Text, or an array of two double values representing X,Y coordinates representing a DiagramConnection or DiagramNode

Possible exceptions

  • Argument [oItemArg ] is not formatted correctly, format must be [Index, Array of X,Y coords, or string Content]

  • The specified DiagramItem index [oItemArg ] is out of range

  • The following item [oItemArg ] was not found.

  • The following DiagramItem [oItemArg ] key was not found.

SelectRange

Description

Select all the diagram items inside a rectangle range

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

dXLeft

A double value representing the left position

dYTop

A double value representing the top position

dXWidth

A double value representing a width value

dYHeight

A double value representing a height value

Possible exceptions

  • Selection is not currently enabled.

CopySelection

Description

Copy the currently selected diagram items to the supplied location offset

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

dXOffset

A double value representing the X offset from its current location

dYOffset

A double value representing the Y offset from its current location

Possible exceptions

  • No DiagramItems are currently selected.

MoveSelection

Description

Move the currently selected diagram items to the supplied location offset

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

dXOffset

A double value representing the X offset from its current location

dYOffset

A double value representing the Y offset from its current location

Possible exceptions

  • No DiagramItems are currently selected.

MoveConnectionEnd

Description

Move the currently selected diagram connection end to the supplied location offset

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

oeStartEnd

An enumerated value, string name, or integer value representing a value from the prpgCommandType enumeration.

dXOffset

A double value representing the X offset from its current location

dYOffset

A double value representing the Y offset from its current location

Possible exceptions

  • The DiagramItem [selected ] is not a DiagramConnector.

  • The option supplied is not one of the valid options, valid options are [{0}]

ConnectToNode

Description

Connect one end of the selected connector to an identified node

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

oeStartEnd

An enumerated value, string name, or integer value representing a value from the prpgCommandType enumeration.

oNodeArg

Integer index, string Content Text, or an array of two double values representing X,Y coordinates representing a DiagramNode

oConnPoint

Optional parameter integer index or string name identifying the connection point. Default value is null, which connect generically to the node not to a specific point.

Possible exceptions

  • The DiagramItem [selected ] is not a DiagramConnector.

  • The option supplied is not one of the valid options, valid options are [{0}]

  • The specified DiagramItem index [oNodeArg ] is out of range

  • The following DiagramItem [oNodeArg ] key was not found.

  • The specified DiagramConnection Point index [oConnPoint ] is out of range

  • The following DiagramConnection Point [oConnPoint ] key was not found.

OpenOptionsPane

Description

Open the options pane for the currently selected DiagramItem

Possible exceptions

  • No DiagramItems are currently selected.

  • DiagramItem OptionsPane is not visible

RenameItem

Description

Renames the selected item

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

sNewName

An enumerated value, string name, or integer value representing a value from the prpgCommandType enumeration.

Possible exceptions

  • One and only one item must be selected to perform this operation.

ResizeNode

Description

Resizes the selected DiagramNode

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

dXLeft

A double value representing the left position

dYTop

A double value representing the top position

dWidth

A double value representing a width value

dHeight

A double value representing a height value

Possible exceptions

  • One and only one item must be selected to perform this operation.

  • The DiagramItem [selected ] is not a DiagramNode.

PerformCommand

Description

Perform the supplied command

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

oeCommand

An enumerated value, string name, or integer value representing a value from the prpgCommandType enumeration.

Possible exceptions

  • No DiagramItems are currently selected.

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic provides information about replay-only actions for testing the XamDiagram™ control.

This topic provides reference information about the XamDiagram™ control’s test object properties.

This topic provides reference material on the common enumerations used for testing the XamDiagram™ control.