Você está na página 1de 3

TechTip: aaGraphic.

GraphicInfo properties and aaGraphic class


properties for use with the ShowGraphic() A2 Graphic Scripting

NOTE: This article and all content are provided on an "as is" basis without any warranties of any kind,
whether express or implied, including, but not limited to the implied warranties of merchantability, fitness
for a particular purpose, and non-infringement. In no event shall Wonderware North be liable for any
special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or
profits, whether in an action of contract, negligence or other tortuous action, arising out of or in
connection with the use or performance of information contained in this article.

Introduction

The ShowGraphic() function in ArchestrA Graphics allows the user to programmatically open ArchestrA graphics
via an ArchrestrA graphic script. Below is a consolidated list of the properties and class properties available for
use with this functionality. For examples on use of the ShowGraphic() script, consult the Application Server
User’s Guide.

Graphic Info class properties:

The following is a list of all properties that are available for use in the aagraphic.graphicinfo graphic class, which
is used in the ShowGraphic animation. The minimum required properties are GraphicName and Identity. For
more info on the Identity property, consult the Application Server User’s Guide.
Property Type Description
Graphic Name String REQUIRED: Name of Graphic to
open
Has CloseButton Boolean Graphic Has Close Button: true:
yes, false: no
HasTitleBar Boolean Graphic Has Title Bar: true: yes,
false: no
Height Integer Height: Used with
CustomizedWidthHeight
Identity String REQUIRED: Internal Graphic
Identity
OwningObject String Graphic’s initial owningobject
property setting
RelativeTo aagraphic.RelativeTo Size Relative To
Resizable Boolean Resizable: True: yes, False: no
ScalePercentage Integer Symbol Scale Percentage. Not
used with
CustomizedWidthHeight.
StretchGraphicToFitWindowSize Boolean Stretch Graphic to Fit Window
Size
StretchWindowToScreenHeight Boolean Stretch Graphic to Desktop
Height

425 Caredean Drive, Horsham, PA 19044


Tel: 877.900.4996
www.wonderwarenorth.com Owned and Operated by Q-mation, an Independent Wonderware software distribution partner.
TechTip: aaGraphic.GraphicInfo properties and aaGraphic class
properties for use with the ShowGraphic() A2 Graphic Scripting
StrethWindowToScreenWidth Boolean Stretch Graphic to Desktop
Width
Width Integer Width: Used with
CustomizedWidthHeight
WindowLocation aagraphic.windowLocation Window Location
WindoRelativePosition aagraphic.windowrelativeposition Window Relative Position
WindowTitle string Title of Window: Used If
HasTitleBar is active
Windowtype aagraphic.windowtype Window Type: Modal or
Modeless
X integer X position. Used with XY Relative
Position types
Y integer Y position. Used with XY Relative
Position types

aagraphic Property Classes:

The following are the custom aagraphic classes used for the aagraphic.<class> datatypes, as prescribed in the
above table. The use syntax is:
Graphicinfo.<property> = aagraphic.<classtype>.<member>
i.e:
graphicInfo.Windowtype = aagraphic.windowtype.modeless;
Class Type Member Description
RelativeTo (Used with CustomizedWidthHeight Custom Width/Height: Specify X
RelativeTo property) and Y property
Desktop Relative To Desktop
Graphic Relative to Graphic
WindowLocation (used with Above Location Above
WindowLocation Property) Below Location Below
Bottom Location starts at bottom of
BottomLeftCorner Location starts at bottom left
corner
Center Location center of
LeftOf Location Left of
LeftSide Location starts center, left Side
RightOf Location starts right of
RightSide Location starts center, rightside
Top Location starts at the top of
TopLeftCorner Location starts at top Left Corner
TopRightCorner Location starts at top right
corner
WindowRelativePosition ClientArea Relative to Client Area (Window
sans Title Bar)

425 Caredean Drive, Horsham, PA 19044


Tel: 877.900.4996
www.wonderwarenorth.com Owned and Operated by Q-mation, an Independent Wonderware software distribution partner.
TechTip: aaGraphic.GraphicInfo properties and aaGraphic class
properties for use with the ShowGraphic() A2 Graphic Scripting
(used with ClientXY Relative to ClientX Y Position.
WindowRelativePosition Use X and Y Properties
property) Desktop Relative to Desktop
DesktopXY Relative to Desktop X Y Position.
Use X and Y Properties
Mouse Relative to Mouse location on
script run
ParentElement Relative to calling Parent
Element
ParentGraphic Relative to calling Parent Symbol
Window Relative to Window (including
Title Bar)
WindowXY Relative to Window X Y Position.
Use X and Y Properties
WindowType (used with Modal Modal Popup
WindowType Propery: Modeless Modeless Popup

Example

An example of using the ShowGraphic script is shown below (from the ArchestrA IDE Help)

Dim graphicInfo as aaGraphic.GraphicInfo;


graphicInfo.Identity = "i1";
graphicInfo.GraphicName = "AnalogHiLo";
graphicInfo.HasTitleBar = true;
graphicInfo.WindowTitle = "Analog Meter 1";
graphicInfo.Resizable = true;
graphicInfo.WindowLocation = aaGraphic.WindowLocation.Leftside;
graphicInfo.WindowType = aaGraphic.WindowType.Modeless;
ShowGraphic( graphicInfo );

425 Caredean Drive, Horsham, PA 19044


Tel: 877.900.4996
www.wonderwarenorth.com Owned and Operated by Q-mation, an Independent Wonderware software distribution partner.

Você também pode gostar