Thursday, December 18, 2014

GTViewer for iOS Version 2.0





It has been over 2 years since GTI began developing GTViewer for iOS, and more than a year has passed since its release.  Version 2.0 will soon be available, and it brings many new features to make GTViewer for iOS even more powerful.

Version 1.0 brought GTViewer datasets to the iOS device (iPhone/iPad) and gave users the ability to operate without the need of a network connection.   Since GTViewer for iOS looks and feels very similar to GTWeb for iOS, the significance of being disconnected from the network sometimes gets lost.  The almost 15 year old code base that drives GTWeb Server and also shared with GTViewer for Windows could not be leveraged on the iOS platform; so, everything had to be created again from scratch.

GTViewer for iOS Version 2.0 provides a multitude of fixes, tweaks, and minor enhancements; it keeps pace with the progression of iOS itself (iOS 5 to iOS 8); and it addresses several user requests.  The most prominent new features are:


  • Redlines – Basic redlining support has been added.  Users can now draw and edit rectangles, circles, text, and freehand.   A new server application called GTShare has also been created to manage these redlines.  Users can post selected redlines to the server and can retrieve redlines that other users have posted.   GTShare also supports GTViewer for Window and GTViewer for Android, so redlines can be shared between any of these users.


Draw Redlines on your iPad

See Redlines in GTViewer for Windows

  • Raster Backdrop Support – While GTViewer for iOS does not yet support native raster backdrop images (MrSID or ECW) on the device, version 2.0 does provide ability to retrieve the backdrop imagery from a GTWeb Server (which does support MrSID and ECW) for the current view.  Retrieving the backdrop image for your current view requires a network connection to download, but the user can keep a number of these images when disconnected.   Many devices do not have enough storage capacity to hold a full raster backdrop imagery dataset, so this alternative to native support may actually turn out to be more useful in the long run.


Find an area you want to see backdrop Imagery.

Download Imagery for Current View.


Downloaded Imagery is still available offline.
        

  • Where Am I – Any tap on the in the map view will display an Attribute Info pop up showing the current location's X/Y and Latitude/Longitude values.  If you are reviewing a feature, this info will be at the bottom of the feature’s attributes.   It is also possible to create custom Where Am I functionality so that a set of polygon features in the data will be searched to see which ones contain the point (similar to the Where Am I functionality in GTViewer and GTWeb).

Standard Where Am I shows Coordinate Info at any point.

Customized Where Am I shows data specific info.


  • Driving Directions – Leveraging the power of other applications on the device, Version 2.0 can now kick off the Google Maps app from any point or feature in its map.  Google Maps will then route you from your current location to the specified destination.

Review a Feature, Press Directions button.

Google Maps is launched with feature's location as the destination.


  • Developer’s Framework - just as GTViewer for Windows has a set of tools for the developer to create applications with GTViewer functionality, the GTViewer Framework for iOS packages up the code-base used by GTViewer for iOS and makes this functionality available to iOS developers to use in their applications.  This Framework is roughly equivalent to the GTViewer Objects (used with .NET) and provides a set of objects capable of reading a GTViewer dataset.   Full map rendering with panning, zooming, and feature selection 
    are also provided.


Wednesday, November 19, 2014

GTViewer 14.0.0.27 is Available



GTViewer version 14.0.0.27 is available.

-----------------------
14.00.00.27 - 11/19/14
-----------------------

- NEW - #7492 - Added the NoSymbolJustification entry to the Additional Properties section to prevent the processing of a justificaiton style value for .DFN symbols.  This mode matches the iOS and Android GTViewer symbol drawing mode.

- FIX - #7493 - The Reset Child Dialog Location command was not resetting the Drawing Info, Measure, Text, or Symbol Dialog locations.

-----------------------
14.00.00.26 - 10/24/14
-----------------------

- FIX - #7486 - Hatch Fills on Shapes with Hole elements will no longer obscure raster or background color underneath.

Wednesday, November 12, 2014

GEO-Energy Summit 2014

Come see GTI at the GEO-Energy Summit at the Davidson Center in Huntsville, Alabama.



Tuesday, October 21, 2014

GTWeb Server version 11.0.0.26 is Available



GTWeb Server version 11.0.0.26 is available.


-----------
11.00.00.26 - 10/21/14
-----------

- FIX - #7488 - Hatch Fills on Shapes with Hole elements will no longer obscure raster or background color underneath.

-----------
11.00.00.25 - 6/25/14
-----------

- NEW - #7450 - RasterOnly mode added to support Raster View Downloads in GTViewer for iOS.

-----------
11.00.00.24 - 5/29/14
-----------

- CHG - #7417 - The GeWAIInfo method will now run even if no WAI entries are defined.  This allows the location info to be shown without the need to define WAI entries.

- NEW - #7418 - The user.ini file can now be encrypted.

- CHG - #7419 - The Encryption Keys have been extracted from the code and defined at a single place in global.asax.


-----------
11.00.00.23 - 5/8/14
-----------


- FIX - #7411 - Repackaged for deployment.

Wednesday, October 15, 2014

GTViewer version 14.0.0.25 is Available



GTViewer version 14.0.0.25 is available.


-----------------------
14.00.00.25 - 10/14/14
-----------------------

- FIX - #7484 - Explicit paths in the Link definitions that were using a UNC path (starting with \\) were having one of the backslashes removed.

-----------------------
14.00.00.24 - 7/22/14
-----------------------

- FIX - #7472 - Fix for Feature Tooltips not working.

-----------------------
14.00.00.23 - 7/21/14
-----------------------

 - NEW - #7467 - The CreateSessionCategory entry has been added to the 
Additional Properties section to create a session category for .gtx files that do not have one.

Wednesday, July 23, 2014

Riding Across America with GTSpot (Completed!)



  • 822 GTSpot Pictures Posted
  • 6/1/14 to 7/22/14  (52 Days)
  • 14 States - California, Nevada, Utah, Colorado, Kansas, Missouri, Illinois, Indiana, Ohio, Pennsylvania, New York, Vermont, New Hampshire, and Maine
  • 3872+ Miles




Friday, July 18, 2014

GTViewer version 14.0.0.22 is Available



GTViewer version 14.0.0.22 is available.

This update fixes a couple of problems with the new Options/Settings added to the previous version plus adds a new method to the API.

-----------------------
14.00.00.22 - 7/9/18
-----------------------

- FIX - #7464 - Fix to the new Settings Options (View Scrollbars and Toolbar Button sizes).

- NEW - #7465 - New method: SetCoordinateConversionInfo method added.

Thursday, July 17, 2014

GTViewer and GTVx with Touch Screens

With Windows 8 and 8.1 machines becoming more widespread, the availability of a Touch Screen is common .  It is also possible to use Windows 7 with a Touch Screen too, so the chances of using GTViewer with a Touch Screen is more and more likely.

Version 14.0.x.21 of GTViewer and 14.0.x.7 of GTVx both provide specific settings to make them run better with a Touch Screen interface.   They have always worked with Windows 8 and 8.1 using conventional inputs (mouse and keyboard), but the scrollbars on the map view window seem to confuse the Touch Screen interface.

In GTViewer, you can now use the Options/Settings dialog to configure 4 different setting values to better use a Touch Screen interface:


  1. Change View Scrollbars to NO.
  2. Change the Mouse Wheel Increment to a negative value.   This will make a 2 finger pinch gesture zoom out instead of zoom in.
  3. Change the Toolbar Button Size to Large, Larger, or Largest.  Making the buttons larger, makes them easier to use with touch.
  4. You may also want to set the Selection Tolerance to a higher value since touch is not as accurate as a mouse click.


The View Scrollbars and Toolbar Button Size settings are new to 14.0.x.21.   Mouse Wheel Increment and Selection Tolerance were already available, and you must use the Set as Default button to retain the value beyond the current session.


In GTVx, you can use the following to set the setting values:

   AxGTVX1.ShowScrollBars(0)
   AxGTVX1.SetDataProperty("MouseWheelIncrement", "-1.5")
   AxGTVX1.SetDataProperty("SelectionTolerance", "6")

Make sure to call the ShowScrollBars method before you open any data.


With these settings, you should be able to use a Pinch to zoom in or out in any mode that you can use the moue wheel to zoom in or out.  

A Touch should behave like a mouse click in most GTViewer modes, and Touch and Hold will activate a right mouse click.


Wednesday, July 16, 2014

GTVx version 14.0.0.7 is Available



Version 14.0.0.7 of GTVx is available.


-----------------------
14.00.00.07 - 7/3/14
----------------------- 

- NEW - #7444 - ShowScrollBars method added to allow scroll bars to be hidden, and fixes to the view when Scroll Bars are turned off.

- FIX - #7445 - ElementGetRange method did not return the correct range for symbols because it was not using the style info.

- FIX - #7453 - Rotated Views would sometimes not refresh entire view, especially when a landscape view was rotated 90 degrees.

- FIX - #7457 - Locates on Count Detail features always used the default zoom level.  It will not fit the feature if the fit zoom level is better than the default.

GTViewer version 14.0.0.21 is Available



GTViewer version 14.0.0.21 is available.

This update to GTViewer provides much better support for Windows 8 and 8.1 in regard to touchscreens as well as Windows 7 when used with a touchscreen.

-----------------------
14.00.00.21 - 7/9/16
-----------------------

- NEW - #7462 - Removable Scroll Bars.  Settings dialog updated to allow scrollbars to be turned off.

- NEW - #7463 - Toolbar button size settings added to the Settings dialog.  This 
option has previously been set in the registry.

Thursday, July 10, 2014

GTField Pro version 9.0.0.30 is Available



GT/Field Pro version 9.0.0.30 is available.

-----------
09.00.00.30 - 7/10/14
-----------

- FIX - #7460 - Copy button on Report forms was crash if the records were of variable lengths.
                
- FIX - #7461 - Reports with different record schemas for the same feature would not display correctly.  First record found now defines the schema for the report.

-----------
09.00.00.29 - 2/20/14
-----------

- FIX - #7373 - The GPS Simulation file will now accept a latitude and longitude, as well as latitude, longitude, altitude.
   

- FIX - #7374 - Optimizations to the GPS Indicator and Trail drawing.

GTViewer 14.0.0.20 is Available



GTViewer version 14.0.0.20 is available.

-----------------------
14.00.00.20 - 7/9/14
-----------------------

- FIX - #7433 - AlwayHideRaster was not working correctly.  It would sometimes be used when it wasn't set.

- CHG - #7454 - The read buffer for NMEA GPS has been changed from 2000 to 100 sothat quicker updates can be received.

- FIX - #7456 - Locates on Count Detail features always used the default zoom level. It will now fit the feature if the fit zoom level is better than the default.

- FIX - #7458 - The Draw Symbol group selection combobox was moved to the right.

-----------------------
14.00.00.19 - 4/24/14
-----------------------

- NEW - #7406 - The DrawClearAll method now supports mode 1000 which will clear only GTShare elements.

-----------------------
14.00.00.18 - 4/16/14
-----------------------

- FIX - #7404 - The SetModifiedStatus method did not correctly set the modified flag and sessions weren't being saved.

-----------------------
14.00.00.17 - 4/15/14
-----------------------

- NEW - #7384 - The element tab on the Attribute iNfo dialog will now center on double-clicked points.

- FIX - #7385 - The GetHighlightedList method was not exposed to automation.

- FIX - #7389 - The Update Preset button did not refresh the Preset list with selected presets indicated.

- NEW - #7391 - SetSelectSymbolGroup method added.

- NEW - #7392 - PresetGetCurrentState method added.

- FIX - #7393 - ASCII to Element conversion was treating Arc 64 elements as it its components were integers.  Used by the Saving session as .GTS functionality.

- FIX - #7400 - Element Modified Events fully implement to match GTVx.

- NEW - #7402 - New Event:  ClearAllSessionGraphics (211).

- NEW - #7403 - The SetDataProperty Undo can be set to Reset to reset the last Undo element in memory.

Sunday, June 29, 2014

Friday, June 13, 2014

Riding Across America with GTSpot

Riding Across America with GTSpot
by Mike Rogers



When Dave Ryder told me he was going to ride his bike across America I said, “Hey, we have an app for that!” We loaded up his iPhone with our GTSpot crowd sourcing application.  The application allows him to post photo reports along his route so that we can see where he is and what he is looking at.  The GTSpot reports capture his location, a photo, a category and any notes he adds.  We designed GTSpot to allow employees and customers to provide reports of conditions in the field.  It is turning out to be very useful to Dave for the same reasons it is good for a utility.  The report is emailed directly to the responsible party for action.  In this case we show the photos on Google Maps as a pin, but they can also be used with GTViewer, GTWeb, or any other app you want.   Dave does not have to manage the upload of the photos at the end of the day, and the photo and report are immediately available for the folks that are tracking him. It is so easy that Dave is taking all his photos with the application, and he is taking about 20 a day.  If you would like to follow Dave’s blog you can check it out at here.   There is a link to the map on his blog.


Let us know if you would like to know how you can use GTSpot to empower your employees and customers at your utility.  GTSpot works on iOS (iPhone/iPad) and Android (phones/tablets). We can brand the app for your company and help you utilize the data it collects.

Day 12 of 52 with 2900 miles to go:


Here are some more photos from the ride:










Wednesday, June 11, 2014

GTVx 14.0.0.6 is Available



Version 14.0.0.6 of GTVx is available.

This is a long post on GTVx update because we having made on a post on it in a while.

-----------------------
14.00.00.06 - 6/11/14
----------------------- 

- NEW - #7260 - IgnoreDataIdForLinks was added to Additional Properties section and to the Get and SetDataProperty methods.

- FIX - #7273 - Dynamic Graphics was not working correctly with encrypted data.

- FIX - #7279 - Composite Group elements (extended Style id = 1, 2, or 3) were not correctly handling having no Style Rule.

- FIX - #7280 - Composite Linestring and shapes(Group Type 1 and Type 2) were not respecting the DisplayWeightThreshold or DisplayStyleThresholds.

- FIX - #7286 - Right Mouse menu pops up if the right mouse menu was up when a shape or line was canceled with right mouse button.

- FIX - #7288 - The Dynamic Graphics Highlight Fill option did not work on  elements who style defined the fill status.

- NEW - #7293 - Queries will now support HighlightMode 2 which will not highlight.

- FIX - #7303 - Placing Text Redlines with multiple lines could truncate each line to the size of the first line.

- FIX - #7309 - ECW Raster files with more than 3 color bands were causing problems.

- NEW - #7314 - New method GetCatFilterListFromFeaStr.

- NEW - #7316 - New methods for Expression Evaluation:  ExpStateReset, ExpStateAddValue, ExpStateGetValue,  ExpEvaluate, ExpValidate, ExpStateGetValueType, ExpStateGetInfo, ExpStateLoadElementData, ExpStateLoadTabularData.

- FIX - #7327 - Mouse Wheel Zoom did not work when using dual screens where the primary monitor is on the right screen and the map view is on the left screen.

- FIX - #7344 - The absolute token in the Link definitions was not working correctly.

- FIX - #7346 - The filter map for Export to DGN was sometimes using a dashed line for stroked symbols and text elements when they should have been solid lines.

- FIX - #7379 - FRAMME Reference features were not correctly being de-referenced.

- NEW - #7386 - PresetChanged event and SendPresetChangedEvent data property added.

- NEW - #7387 - SetSelectSymbolGroup method added.

- FIX - #7388 - The Update Preset button did not refresh the Preset list with selected presets indicated.

- NEW - #7390 - PresetGetCurrentState method added.

- FIX - #7395 - ASCII to Element conversion was treating Arc 64 elements as it its components were integers.  Used by the Saving session as .GTS functionality.

- NEW - #7401 - New Event: ClearAllSessionGraphics

- FIX - #7416 - The ToLatLong and FromLatLong methods were not working with Custom Coordinate systems.

- FIX - #7434 - AlwayHideRaster was not working correctly.  It would sometimes be used when it wasn't set.

- FIX - #7435 - Fixes to the ECW Rendering that could cause some files not to display and lines in printing.

-----------------------
14.00.00.03 - 8/21/13
----------------------- 

- FIX - #7258 - Invert a Dynamic Graphic element's color if the color is the same as the background.


-----------------------
14.00.00.02 - 8/02/13
----------------------- 

- FIX - #7253 - Count for Dynamic Graphics was not working on the Detail Dialog for Info and Locate if the values were no longer visible in the view.

-----------------------
14.00.00.01 - 7/26/13
----------------------- 

- CHG - #7121 - The Unit label associated with Length in feature counting is now put in the column header instead of each record.

- FIX - #7131 - Dynamic Graphics Mask was not filled when emphasize mode was on.

- FIX - #7132 - The Mask option with Dynamic Graphics was not supporting the Allow Emphasize option correctly.

- FIX - #7136 - Draw Text dialog string process changed to match GTViewer's and will no longer leave a trailing carriage return.

- FIX - #7148 - The Dimension Element dialog showed the Label orientation as Left/Top and Right/Bottom.  They should be Right/Top and Left/Bottom.

- FIX - #7152 - When Drawing a Shape, the Right Mouse menu would display when using the Rightmouse button to close the shape.

- NEW - #7154 - The zoom level for style select for Print can be specified now with the Print Property.

- FIX - #7155 - Decryption mechanism was not fully implemented.

- NEW - #7156 - GetFeatureTooltipDef and RemoveFeatureTooltip methods added.

- NEW - #7157 - Get Total Length button added to the Highlight/Thematic Query dialog.

- NEW - #7160 - New Methods: GetTabularDataFilename, GetFilterFilename,GetCategoryGraphicsFilename

- NEW - #7162 - InitializeGetIntersecting and GetNextIntersecting methods have been added.

- FIX - #7182 - Placing Session Graphics Text that uses a style rule to change the font id, has been modified to use the style rule font so that the interactive display of the font is correct.

- CHG - #7185 - Mouse Wheel Zoom is now center on mouse cursor for non-rotated views.

- NEW - #7186 - The DMUpdateBitmapByFilterId method has been added.

- NEW - #7192 - The PresetGetAvailableList method added to GTVx to match the method of that name in GTViewer.

- NEW - #7193 - GetExtractFilename, GetSessionFilename, GetExtractFilename methods added to match GTViewer.

- NEW - #7197 - View History now stored in Session data.

- NEW - #7198 - New Method:  CloseFile

- NEW - #7199 - The Location History dialog from GTViewer has been added and is displayed with the ActivateLocationHistoryDialog method.

- NEW - #7201 - The UserInteraction Data Property has been added to enable to disable user input to the control.

- FIX - #7209 - DrawClearAll was not setting the file modified flag.

- NEW - #7224 - The CompactLabelMode Print Property was added.

- NEW - #7246 - Feature Counting will now support Dynamic Graphics elements.

- NEW - #7247 - The By Feature and By Feature Component options added to the Feature Count Options dialog.

- NEW - #7248 - The Info and Save options have been added to the Count Details dialog.

- NEW - #7249 - Attribute Info Dialog will now show Override Info on Element tab.

- NEW - #7250 - Attribute Info Dialog will now show the Style Definition Id and Style Name Map info on Element Tab.

- NEW - #7251 - FromLatLong, ToLatLong, and CoordinateConversionAvailable methods have been add.  These methods are supported by the CoorSys, CoordSysParam1, and CoorSysParam2 entries in the Additional Properties section of the .GTM.

Wednesday, June 04, 2014

GTViewer Expression Syntax

The following reference is for the Expression Syntax used by various GTI products.   This post will provide an easy to find reference without having to remember which document it is in.  

The expression syntax is used by GTViewer's Dynamic Graphics, Feature Tooltips, Custom Attribute Info Tabs, Link Definitions, and Where Am I.    GTViewer and GTVx also provide set of methods to directly access the Expression Evaluator:  ExpStateReset, ExpStateAddValue, ExpStateGetValue, ExpStateGetValueType, ExpStateGetInfo, ExpStateLoadElementData, ExpStateLoadTabularData, ExpValidate, and ExpEvaluate. 

GTWeb also supports the Custom Attribute Tabs and Where Am I functionality.

*** NOTE: Some of the formatting of the Less Than and Greater Than signs didn't come through on this post.  I will work on getting that fixed.

GTViewer Expression Syntax

Literals. 3
  • Integer Literals
  • Double Literals
  • String Literals
Arithmetic Operators
  • Unary Operators:  + , -
  • Binary Operators:  /, *, +, -
Grouping Operators
  • Parentheses
Comparison Operators
  • Equality Operators:  =,  ==, <>, !=
  • Relational Operators:  <,  >,  <=,  >=
  • Special Comparison Operators: LIKE, IN
Logical Operators
  • Logical AND
  • Logical OR
  • Logical NOT and !
Type Cast Functions
  • Integer Cast Functions:  ToInt, CInt
  • Double Cast Functions: ToDouble, CDbl
  • String Cast Functions: ToString, CStr
String Functions
  • Trim Functions: LTrim, RTrim, Trim
  • Case Functions: Upper, Lower
  • String Length Function: Length
  • String Concatenation Function: Concat
  • String Extraction Function: Substr
  • String Replacement Function: Replace
  • String Padding Functions:  RPad, LPad
  • String Search Function: Instr
  • String From ASCII Code Function: CHR
  • Number Formatting Function: Format
  • String Formatting Function:  Pretty
Miscellaneous Functions
  • IF Function:  IFFUNCT
Constants
Variables

. 15
Special Variables. 17


Integer Literals
·         Integer Literals are 32 bit signed Integer values (-2,147,483,648 through 2,147,483,647).

Example
123
0
1024


Double Literals
·         Double Literals are 64 bit double values (4.94065645841246544E-324 through 1.79769313486231570E+308).

Example
0.0
123.456
3.14159


String Literals
·         A String Literal must be enclosed in single quotes (' ') or double quotes (" ").

Example
'a'
"a"
'abc'
"abc"




Arithmetic Operators

Unary Operators:  + , -
·         The unary + operator will make the operand positive.

Example
Evaluates To
+1 
1
+1 + 1 
2
+1++1 
2

·         The unary – operator will negate the operand.

Example
Evaluates To
-2
-2
1 + -2
-1
1 - -1
2


Binary Operators:  /, *, +, -

·         The / operator will divide the left operand by the right operand.

Example
Evaluates To
6 / 3
2.000000
3 / 2
1.500000
5 / 0 
**Error**

·         The * operator will multiply the left operand by the right operand.

Example
Evaluates To
6 * 3
18
3 * 0.5
1.500000
5 * 0 
0

·         The + operator will add the left and right operands.

Example
Evaluates To
6 + 3
9
3 + 0.5
3.500000
5 + 0 
5

·         The – operator will subtract the right operand from the left operand.

Example
Evaluates To
6 - 3
3
3 - 0.5
2.500000
5 - 0 
5



Grouping Operators 

Parentheses
·         The Parentheses operators can be used to group parts of an expression together so that their order of execution can be controlled.   Grouped parts of an expression are evaluated inside out.

Example
Evaluates To
(1)
1
(1 + 2) * (3 + 4)
21
(1 < 2) and (4 < 3 or 1>2 or 3>1)
1



Comparison Operators

Equality Operators:  =,  ==, <>, !=
·         Both the = and == operators can be used for equality comparisons.   They will return 1 (True) if the left and right operands are equal; otherwise, they will return 0 (False).
Example
Evaluates To
2 = 1+1
1
3 = 1 + 1
0
2 == 1 + 1
1
3 == 1 + 1
0
'abc' = 'def'
0

·         Both the <> and != operators can be used for inequality comparisons.  They will return 0 (False) if the left and right operands are equal; otherwise, they will return 1 (True).

Example
Evaluates To
2 <> 1+1
0
3 <> 1 + 1
1
2 != 1 + 1
0
3 != 1 + 1
1
'abc' <> 'def'
1


Relational Operators:  <, >,  <=,  >=
·         The < operator will return 1 (True) if the left operand is less than the right operand; otherwise, it will return 0 (False).

Example
Evaluates To
123 < 456
1
456 < 123
0
123 < 123
0
'abc' < 'def'
1


·         The <= operator will return 1 (True) if the left operand is less than or equal to the right operand; otherwise, it will return 0 (False).

Example
Evaluates To
123 <= 456
1
123 <= 123
1

·         The > operator will return 1 (True) if the left operand is greater than the right operand; otherwise, it will return 0 (False).

Example
Evaluates To
123 > 456
0
456 > 123
1
123 > 123
0
'abc' > 'def'
0

·         The >= operator will return 1 (True) if the left operand is greater than or equal to the right operand; otherwise, it will return 0 (False).

Example
Evaluates To
456 >= 123
1
123 >= 123
1

Special Comparison Operators: LIKE, IN
·         The LIKE operator will compare the left String operand to a pattern defined in the right String operand.   The following patterns are allowed where 'xxx' is a string and the % is the accepted wildcard character:  Begins With ('xxx%'), Ends With ('%xxx'), and Contains ('%xxx%).

Example
Evaluates To
'abc' like 'abc'
1
'abcdef' like 'abc%'
1
'abcdef' like '%def'
1
'abcdef' like '%cd%'
1
'abc' like '%'
1
'abc' like '%bcd'
0
'abcdef' like '%defg%'
0
'abcdef' like '%abc%'
1
'abcdef' like '%def%'
1

·         The IN operator will compare the left operand to the parenthesis enclosed list of expressions in the right operand.  If the left operand matches an item in the list, 1 (True) is returned; otherwise, 0 (False) is returned.   The list of expressions on the right must evaluate to a type compatible with the left operand’s type (Numbers to Numbers, Strings to String).

Example
Evaluates To
123 IN (100,110,120,130)
0
120 IN (100,120,130,140)
1
'D' IN ('A', 'B', 'C', 'D', 'E')
1




Logical Operators

Logical AND
·         The AND operator will return 1 (True) if the left and right operands are both True (evaluate to a non-zero value).  If one or both of the operands are False (evaluate to 0), then 0 (False) is returned.

Example
Evaluates To
1 and 1
1
1 and 0
0
0 and 1
0
0 and 0
0
True and True
1
True and False
0
False and True
0
False and False
0

Logical OR
·         The OR operator will return 1 (True) if either the left or the right operand is True (evaluates to non-zero value).   If both operands are False (evaluate to 0), then 0 (False) is returned.

Example
Evaluates To
1 or 0
1
0 or 1
1
1 or 1
1
0 or 0
0
True or False
1
False or True
1
True or True
1
False or False
0

Logical NOT and !
·         The NOT and ! operators will return 0 (False) if the following operand is True (evaluates to a non-zero value) and will return 1 (True) if the operand is False (evaluates to a 0).

Example
Evaluates To
Not 1
0
Not 0
1
!1
0
!0
1
Not True
0
Not False
1
!True
0
!False
1

Type Cast Functions

The Type Cast Functions are used to convert the type of an expression to another type.  For example, Integer and Double values can be converted to Strings, and Strings can be converted to Integer or Double values.
  • Type Cast Function syntax: 
    • ToInt( ) as Integer
    • CInt( ) as Integer
    • ToDouble( )  as Double
    • CDbl( ) as Double
    • ToString( ) as String
    • CStr( ) as String

Integer Cast Functions:  ToInt, CInt
  • The ToInt and CInt functions will cast a Double or String expression to an Integer Value.  If a String cannot be converted, it will return 0.   The Decimal value for Double values will be truncated.

Example
Evaluates To
ToInt( '123456')
123456
CInt( 1234.56 )
1234


Double Cast Functions: ToDouble, CDbl
  • ToDouble and CDbl will cast an Integer or String expression to a Double value.   If a String cannot be converted, it will return a 0.0.

Example
Evaluates To
ToDouble( '123.456' )
123.456000
CDbl( 123 )
123.000000


String Cast Functions: ToString, CStr
·         ToString and CStr will cast a Double or Integer expression to a String Value.

Example
Evaluates To
ToString( 1 + 2 + 3 )
'6'
CStr( 1 + 2 + 3 )
'6'




String Functions

Trim Functions: LTrim, RTrim, Trim
·         The LTrim function returns the String value specified in the first parameter with no leading spaces.

§   LTrim( str as String ) as String

Example
Evaluates To
LTrim('   abc   ')
'abc   '

·         The RTrim function returns the String value specified in the first parameter with no trailing spaces.

§   RTrim( str as String ) as String

Example
Evaluates To
RTrim('   abc   ')
'   abc'

·         The Trim function the String value specified in the first parameter with no leading or trailing spaces.

§   Trim( str as String ) as String

Example
Evaluates To
Trim('   abc   ')
'abc'

Case Functions: Upper, Lower

·         The Upper function returns the String value specified in the first parameter in all upper case.

§   Upper( str as String ) as String

Example
Evaluates To
Upper('abc')
'ABC'

·         The Lower function returns the String value specified in the first parameter in all lower case.

§   Lower( str as String ) as String

Example
Evaluates To
Lower('ABC')
'abc'



String Length Function: Length
·         The Length function returns an Integer value specifying the number of characters in the String value specified in the first parameter.

§   Length( str as String ) as Integer

Example
Evaluates To
Length('abc')
3
Length('')
0


String Concatenation Function: Concat
·         The Concat function returns a String value that is the concatenation all String values specified as parameters.   There must be from 2 to 10 String values provided as parameters.

§   Concat( str1 as String, str2 as String) as String
§   Concat( str1 as String, str2 as String, …, str_N as String ) as String

Example
Evaluates To
Concat('abc', 'def')
'abcdef'
Concat('abc', 'def', 'ghi')
'abcdefghi'
Concat('abc', 'def', 'ghi', 'jkl')
'abcdefghijkl'


String Extraction Function: Substr
·         The Substr function returns a String value containing a substring of the String value provided in the first parameter.  The second parameter is an Integer value specifying the zero based starting position of the substring.  A third, optional Integer parameter can be used to specify the length of the substring; if no length is specified, the substring will go from the starting position to the end of the string.

§   Substr( str as String, startPos as Integer ) as String
§   SubStr( str as String, startPos as Integer, length as Integer ) as String

Example
Evaluates To
Substr('abcdef',3)
'def'
Substr('abcdef',2,2)
'cd'


String Replacement Function: Replace
·         The Replace function returns a new String value created by taking the String value specified in the first parameter and replacing all of its occurrences of the String specified in the second parameter with the String value specified in the third parameter.  The third parameter is optional; omitting it will remove all occurrences of the second parameter from the first.

§   Replace( str as String, oldValue as String ) as String
§  Replace ( str as String, oldValue as String, newValue as String) as String


Example
Evaluates To
Replace('abcdef','bcde')
'af'
Replace('abcdef','bcde','*')
'a*f'


String Padding Functions:  RPad, LPad
·         The RPad function returns a String value where the first parameter String value is padded on the right side with the number of spaces needed to make the String contain the number of characters specified by the second parameter.  A third, optional parameter can specify the padding String value.

§   RPad( str as String, count as Integer ) as String
§   RPad( str as String, count as Integer, padStr as String ) as String


Example
Evaluates To
RPad('abc',6)
'abc   '
RPad('abc',6,'~')
'abc~~~'

·          The LPad function returns a String value where the first parameter String value is padded on the left side with the number of spaces need to make the String contain the number of character specified by the second parameter.  A third, optional parameter can specify the padding String value.

§   LPad( str as String, count as Integer) as String
§   LPad( str as String, count as Integer, padStr as String) as String

Example
Evaluates To
LPad('abc',5)
'  abc'
LPad('abc',5,'*')
'**abc'



String Search Function: Instr
·         The Instr function returns the zero-based index position in the first parameter String value of the second parameter String value.  A third, optional parameter can be used to specify a zero-based search starting position; 0 is used as the starting position if the third parameter is not specified.  If the second parameter String is not found in the first, the function will return -1.

§   Instr( str as String, searchStr as String ) as String
§   Instr( str as String, searchStr as String, startPos as Integer ) as String

Example
Evaluates To
Instr('abcdefghij','fgh')
5
Instr('abcdefghij','jkl')
-1
Instr('abcdabcdabcd','d',8)
11
Instr('abcdabcdabcd','a',9)
-1


String From ASCII Code Function: CHR

  • The CHR function returns a String value containing the ASCII character for the specified integer value.
§   CHR( val as INTEGER ) as String

Example
Evaluates To
CHR(65)
'A'
CHR(97)
'a'
CHR(48)
'0'


Number Formatting Function: Format
·         The Format function returns a String value of a Double value specified in the first parameter.  The second parameter is an Integer value specifying the width of the string that will be created.  The third, optional parameter can be used to specify the zero-based number of the digit that will be shown to the right of the decimal point.

§   Format( value as Double, width as Integer ) as String
§   Format( value as Double, width as Integer, prec as Integer ) as String

Example
Evaluates To
Format(12.452, 6,2)
' 12.45'
Format(12.456, 6,2)
' 12.46'
Format(12.456, 6,4)
'12.4560'
Format(12.456, 6)
'    12'




String Formatting Function:  Pretty
  • The Pretty function returns a String value that has been formatted according to a specify rule.  This first parameter specifies a string to format.  The second optional parameter is the mode and can be 0, 1, or 2.  If the mode is not set, it will default to 0.  The modes are listed below:
·         Mode 0 – Capitalize the first letter of each word in the string and make the rest of the characters lower case.
·         Mode 1 – Replace all Underscores (_) with spaces.
·         Mode 2 – Combination of modes 0 and 1.

§   Pretty( value as String ) as String
§   Pretty( value as String, mode as Integer ) as String

Example
Evaluates To
Format('THIS_IS_A_TEST')
'This_Is_A_Test'
Format('THIS_IS_A_TEST',0)
'This_Is_A_Test'
Format('THIS_IS_A_TEST',1)
'THIS IS A TEST'
Format('THIS_IS_A_TEST',2)
'This Is A Test'




Miscellaneous Functions

IF Function:  IFFUNCT
  • The IFFUNCT function will evaluate the expression specified in the first parameter.  If the expression is True (non-zero), the second parameter expression is evaluated and returned; otherwise, the third parameter expression is evaluated and returned.   The second parameter determines the return type.

§   IfFunct( , , ) as

Example
Evaluates To
IfFunct( 1, 'a','b')
'a'
IfFunct( 0, 'a','b')
'b'
IfFunct( 1, 2, 3)
2
IfFunct( 0, 2, 3)
3


Constants

           Constants:  TRUE, FALSE, CRLF

·         The TRUE constant is an Integer value that will always evaluate to 1.
·         The FALSE constant is an Integer value that will always evaluate to 0.
·         The CRLF constant is a String value that will always evaluate to a Carriage Return-Linefeed character (\n).

Example
Evaluates To
True
1
False
0
CRLF
'\n'


Variables

Variables:   , []

o   Variables can be of the INTEGER, DOUBLE, or STRING type.
o   Variable Name can be any Alphabetical character followed by zero or more Alphanumeric characters, or an Under Score (_).

Example
A
Var1
Var_1

o   For variable names that don’t meet the above criteria, Complex Name can be used.  They can contain any Letter, Number, or Symbol except square brackets ( [ , ] ), single quotes ( ' ), or double quotes ( " ).  The Complex Name must be enclosed in square brackets.

Example
[a]
[Pole.Material]
[Pole Material]




Special Variables

There are currently two special variables that can be used with the Dynamic Graphics’ Criteria Expression and Label Expression.  These values are driven by the feature’s geometry.

·         [GTI_GTI.Length] will be set to the linear length of Linear and Shape features.  Its value will be returned as a String type, so it must be cast as a Double (with ToDouble) to be used as a numeric value.   The units will always be master units. 

·         [GTI_DG.Area] will be set to a Shape features area.  Its value will be returned as a String type, so it must be cast as a Double (with ToDouble) to be used as a numeric value.  The units will always be square master units.