This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lib = function() { | |
// all the code for your lib goes here | |
lib.myFunction = function(){}; | |
}(); | |
// Support AMD module format | |
var define; | |
if (typeof define == 'function' && define.amd) { | |
define(function () { | |
return lib; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Overrides Sub Execute(ByVal paramvalues As IArray, ByVal trackcancel As ITrackCancel, ByVal envMgr As IGPEnvironmentManager, ByVal message As IGPMessages) | |
Dim parameterValue As IGPValue | |
If CType(envMgr, IGeoProcessorSettings).OverwriteOutput Then | |
parameterValue = GpUtilities.UnpackGPValue(paramvalues.Element(2)) | |
If Not parameterValue Is Nothing Then | |
If GpUtilities.Exists(parameterValue) Then | |
GpUtilities.Delete(parameterValue) | |
End If | |
End If |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim gp As IGeoProcessor = New ESRI.ArcGIS.Geoprocessing.GeoProcessor | |
gp.AddToolbox(regTb) 'location of toolbox with above python code embedded | |
Dim iv As ESRI.ArcGIS.esriSystem.IVariantArray = New ESRI.ArcGIS.esriSystem.VarArrayClass() | |
iv.Add(_toolBoxLocation) 'location of toolbox created from .net dll | |
gp.Execute("registerTbx_regarcpy", iv, Nothing) | |
gp.RemoveToolbox(regTb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Units | |
inputParameter = New GPParameterClass() | |
inputParameter.DataType = New GPStringTypeClass() | |
'Set the default value | |
gpStringValue = New GPStringClass() | |
gpStringValue.Value = "meters" | |
inputParameter.Value = CType(gpStringValue, IGPValue) | |
inputParameter.Direction = esriGPParameterDirection.esriGPParameterDirectionInput | |
inputParameter.DisplayName = "Units" | |
inputParameter.Name = "in_units" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python Script | |
tlb = arcpy.GetParameterAsText(0) | |
# Load required toolboxes | |
arcpy.ImportToolbox(tlb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim pGPUtilities As ESRI.ArcGIS.Geoprocessing.IGPUtilities3 | |
pGPUtilities = New ESRI.ArcGIS.Geoprocessing.GPUtilitiesClass | |
pGPUtilities.CreateToolboxFromFactory(toolboxAlias, folder, tbname) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(config) { | |
config.set({ | |
// base path, that will be used to resolve files and exclude | |
basePath: '', | |
frameworks: ['jasmine', 'dojo'], | |
// list of files / patterns to load in the browser | |
files: [ | |
'spec/main.js', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Import modules: | |
import arcpy | |
from arcpy import env | |
import os | |
# 2. Set Parameters: | |
env.workspace = arcpy.GetParameterAsText(0) | |
option = arcpy.GetParameterAsText(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../../tsd.ts.ts" /> | |
/// <amd-dependency path="dojo/text!./templates/myWidget.html" name="template" /> | |
declare var template: any; | |
//dojo | |
import dojoDeclare = require("dojo/_base/declare"); | |
//dijit | |
import WidgetBase = require("dijit/_WidgetBase"); | |
import TemplatedMixin = require("dijit/_TemplatedMixin"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"error" : | |
{ | |
"code" : 400, | |
"message" : "Unable to complete operation.", | |
"details" : [ | |
"'where' parameter not specified", | |
"'objectIds' parameter not specified", | |
"'time' parameter not specified", |
OlderNewer