Example
- Last UpdatedAug 29, 2024
- 2 minute read
-
Create a new InTouch application and launch WindowMaker.
-
Create a UDT and rename to $Tank.
-
Open the Tank UDT, and add attributes:
-
Flow: as Integer
-
Temp: as Real
-
-
Add location attributes Latitude and Longitude.
-
Create first instance of $Tank and rename it to Tank1.
-
Create second instance and rename it to Tank2.
-
Create the members under Tank1 and set below member (attribute) values as below:
-
Tank1.Flow = 11
-
Tank1.Temp = 54.5
-
Tank1.Latitude = 33
-
Tank1.Longitude = -114
-
-
Create the members under Tank2 and set below member (attribute) values as below:
-
Tank2.Flow = 21
-
Tank2.Temp = 65.5
-
Tank2.Latitude = 36.746
-
Tank2.Longitude = -119.773
-
-
Create new graphic Tank1Sym and open in Industrial Graphic Editor.
-
Draw a rounded rectangle.
-
Add two text primitives with value display animations for Analog elements as below:
-
Tank1\Flow
-
Tank1\Temp
-
-
Add label for Tank1 inside rounded rectangle.
-
Save and close Industrial Graphic Editor.
-
Repeat steps 11-15, for Tank2Sym
-
Tank2\Flow
-
Tank2\Temp
-
-
In the Industrial Graphics pane, open the Widgets folder and double-click on Map_App to open Map_App settings.
-
In the Locations tab, type or drag and drop the graphic for each asset. Use Tank1Sym for Tank1 asset’s graphic. Use Tank2Sym for Tank2 asset’s graphic.
-
For Tank2, set the Layer to State from the drop down.
-
Click OK.
-
Create a new graphic, name it MyMap, and open in Industrial Graphic Editor.
-
Right-click on canvas, click on Embed Industrial Graphic.
-
In the Widgets folder, select and embed the Map_App widget on to the canvas and adjust the size to fill the page.
-
Edit the widget property for the Map_App widget as below:
-
ConfigName = Default
-
CurrentZoom = 5
-
InitialLatitude = 33
-
InitialLongitude = -11
-
InitialZoom = 30
-
-
Save and close Industrial Graphic Editor.
-
Navigate to File > New and create Frame_window.
-
Embed the MyMap graphic on to the frame window created in step 19.
-
Close and save the window.
-
Fast switch to WindowViewer and then open the window containing the MyMap graphic.
-
Click the - button to zoom out.