In this topic
About the ArcGIS Snippet Editor title, long description, type, and directory options
The Title, Long Description, Type, Directory – ArcGIS Snippet Editor dialog box is the second in a series of dialog boxes that lets you create or edit an ArcGIS snippet. See the following screen shot:
Using the title, long description, type, and directory options
The following describes the areas on the Title, Long Description, Type, Directory - ArcGIS Snippet Editor dialog box:
- Title—Type a short descriptive name for the ArcGIS snippet. The title is saved with a .snippet extension. Make sure the title only contains American Standard Code for Information Interchange (ASCII) characters. The following are acceptable:
- A-Z
- a-z
- 0-9
- - (hyphen)
- _ (underscore)
- Spaces
- Long Description—Type a more detailed explanation for the functionality of the ArcGIS snippet. This information is also used to generate the Long Description in the Additional Comments section.
The title name shows in the ArcGIS Snippet Finder with the standard Microsoft snippet insertion hierarchy. The title information is also used to generate the ArcGIS snippet title in the Additional Comments section.
For more information about the Additional Comments section, see "Insertion preferences" in the topic, Code insertion options.
- Snippet Type—Select a snippet type from the Snippet Type drop-down list. The snippet type is a special tag in the Extensible Markup Language (XML) for the ArcGIS snippet, which indicates the type of snippet you are creating. The following are the snippet types in the drop-down list:
- function-sub-method—A single function or sub (Visual Basic), or method (C#) code fragments placed at the root level of a class file. The function-sub-method is the default snippet type.
- statements—Code fragments that act as templates for you to modify. Usually, code from statements snippets will not compile unless you make modifications. Unless otherwise directed, insert statements snippets in an existing method, function, or sub in your class. Typically, they do not perform a complete programming task. The majority of snippets provided by Microsoft with Visual Studio are the statements type (that is, code fragments). Microsoft does not make a distinction between different snippet types (this is a term specific to ArcGIS snippets). For more information, see Statements option for the ArcGIS Snippet Editor.
-
other—This snippet type has multiple methods, subs or functions, or global variables that need to be at the root of a class file. The ArcGIS Snippet Editor can also be used if the snippet contains the complete contents of a class file. The "other" snippet type can be inserted anywhere in a class file, although the typical behavior is to insert the code at the root of the class file.
Depending on the specified snippet type, determines the behavior of the ArcGIS Snippet Finder when you insert a snippet into your class file. The ArcGIS Snippet Finder shows warning messages if you try to insert an ArcGIS snippet in an invalid location in the class file; therefore, make sure you specify the correct snippet type. See the following screen shots that show the warning messages: - Output Directory—Click the Specify an Output Directory folder browser button to specify the ArcGIS snippet's output directory location (opens the Browse For Folder dialog box). You "cannot" type in the Output Directory text box. You must click the Specify an Output Directory folder browser button to change the location where the ArcGIS Snippet Editor writes snippets to disk.
Changing the output directory on the Title, Long Description, Type, Directory – ArcGIS Snippet Editor dialog box changes the default directory location in the ArcGIS Snippet Editor Manager dialog box.
The initial default location for user created ArcGIS snippets is %APPDATA%\ESRI\ArcGISSnippets. The %APPDATA% environment variable is set by the Windows operating system. To verify the %APPDATA% location, type %APPDATA% in Windows Explorer's Address bar, then press Enter.
The directory path the ArcGIS Snippet Editor uses to list custom ArcGIS snippets is persisted in the following location:
- %APPDATA%\ESRI\ArcGISSnippets\Settings\ArcGISSnippetEditorPreferences9.xml
For developers using Windows Vista, if you discover that you are not able to navigate to the %APPDATA% folder when using the Browse for Folder dialog from the ArcGIS Snippet Editor dialog, you may need to change Windows Operating System Folder Options to Show hidden files and folders. By default in Windows Vista the option for Folder Options is do not show hidden files and folders.
The following is a screen shot example of not being able to see the %APPDATA% folder in Windows Vista when the Folder Options is set to do not show hidden files and folders.
The following is a screen shot example of being able to see the %APPDATA% folder in Windows Vista when the Folder Options is set to show hidden files and folders.
To change the options in the Windows Vista Operating System to allow for viewing hidden files and folders, open the Control Panel and switch to the Classic View. Then click on the Folder Options icon and select the View tab. From here you can choose Show hidden files and folders to enable viewing the %APPDATA% directory. See the following screen shot:
See Also:
ArcGIS Snippet EditorOverview of the ArcGIS Snippet Editor Manager
Customization options for the ArcGIS Snippet Editor Manager
Source code option for the ArcGIS Snippet Editor
References option for the ArcGIS Snippet Editor
Extensions, products, and versions options for the ArcGIS Snippet Editor
Snippets for ArcGIS .NET developers
ArcGIS Snippet Finder
Development licensing | Deployment licensing |
---|---|
ArcView | ArcView |
ArcEditor | ArcEditor |
ArcInfo | ArcInfo |
Engine Developer Kit | Engine Runtime |