johnmdye

ArcGIS License Server Options Syntax Highlighter

Blog Post created by johnmdye on Aug 7, 2015

As the GIS Manager where I work, part of my job includes managing our License Server and ensuring that users who are authorized a GIS license can get one, and those who are not can't -- even if the latter somehow knows the name of the license server.

 

This is where the Options File comes into play for the ArcGIS License Server Administrator. Using the Options file, you can do all kinds of very cool things such as grant users and/or groupings of users (or machines and/or groupings of machines or even IP addresses and/or groupings of IP addresses) access to certain licenses and extensions, restrict the cumulative number of licenses groups can use concurrently, outright restrict certain licenses and all sorts of other whiz-bang crazy stuff all you control freaks out there will really love.

 

Once of the challenges I faced though while implementing our options file was actually understanding what everything was doing in a quick and intuitive manner. As a Python and JavaScript developer, I'm used to having Intellisense (also referred to as AutoComplete) as well as Syntax highlighting fully integrated with my IDE. When I type, it tries to guess what I'm typing based on where I am typing within the Object-Model. There are no IDEs that know what an ArcGIS options file is. That's fine though - the ArcGIS Options File is not complex enough to warrant creation in a fully fledged IDE in the first place. When you're crafting a large or complex Options file though, you might need just a little help.

 

That's where my favorite Text Editor, Notepad++ comes in. It's a basically an enhanced text editor with all kinds of helper tools and plugins available. In addition, you can create your own Syntax Highlighter for custom code. With that, I decided to create a Syntax Highlighter for the ArcGIS Options file so that I could quickly make sense of everything I had written and ensure my syntax was consistent and correct.

 

The syntax highlighter is a simple UDL file that you can import into Notepad++.

Language ==> Define your language ===> Import

 

Once you've done that, you'll see the item 'AGS License Opt' in the Language menu of Notepad++. Selecting that option will highlight keywords in the options file when you type then, based on what that keyword does.

ArcGISOptions_01.png

 

 

The breakdown of the syntax highlighting is as follows:
Comments

Comments are highlighted in green, formatted as Bold and denoted by a hashtag (#)

# This is a comment

 

Internal Feature Names

Internal Feature Names are organized into two classifications;

License Levels

Internal Feature Names which refer to one of the three licensing levels of the core ArcGIS for Desktop product are highlighted in royal blue and denoted by one of the following Internal Feature Names:

    • ARC/INFO
    • EDITOR
    • VIEWER

Extensions

Internal Feature Names which refer to an ArcGIS for Desktop Extension product are highlighted in light blue and denoted by one of the following internal feature names. I couldn't find a comprehensive listing of Internal Feature Names so if I missed something, please let me know in the comments.

    • TIN
    • GRID
    • BUSINESS
    • NETWORK
    • ARCSCAN
    • INTEROP
    • GEOSTATS
    • MAPLEX
    • PUBLISHER
    • SCHEMATICS
    • TRACKING

 

Options

Option keywords used to manage licenses by allocating or restricting them are highlighted in a orange and denoted by one of the following keywords:

  • EXCLUDE
  • EXCLUDE_ENTITLEMENT
  • EXCLUDEALL
  • INCLUDE
  • INCLUDE_ENTITLEMENT
  • INCLUDEALL
  • MAX
  • RESERVE

 

Group Options

Option keywords used to group together Type-options are highlighted in pink and denoted by one of the following keywords:

  • GROUP
  • HOST_GROUP

 

Type Options

Option keywords used to specify what Type of parameter the Option is based on (referred to as a "Type" in the ArcGIS Options file documentation) are highlighted in red and denoted by one of the following keywords:

  • USER
  • HOST
  • DISPLAY
  • INTERNET

 

Administrative Options

Option keywords which affect behavior of the License Server but do not affect the actual management of the licenses are highlighted in grey and denoted by one of the following keywords:

  • GROUPCASEINSENSITIVE
  • DEBUGLOG
  • NOLOG
  • TIMEOUT
  • TIMEOUTALL

 

The result of all of this is a much more intuitive options file that makes defining and editing the License Server Options file much easier. It also reduces mistakes since you can see how your syntax is structured and validate that you are using the correct keywords and internal feature names with a simple glance, ie. if your keyword isn't highlighted, it's probably not valid.

ArcGISOptions_02.png

If you don't like the default highlighting settings once you've imported the UDL, you can change them very easily in Notepad++ by clicking the "Define your language..." option in the Language menu of Notepad++, selecting "AGS License Opt" from the User Language combobox and tinkering with the settings behind each of the Styler buttons for each keyword group.

Outcomes