POST
|
That worked, thanks! I was trying to add the reference in the usual manner and it wouldn't show for some reason.
... View more
09-28-2017
07:34 AM
|
0
|
0
|
527
|
POST
|
I'm trying to update a project using ArcObjects 10.0 to 10.4.1. I'm having trouble at this line in the code: ESRI.ArcGIS.DataManagementTools.CreateRandomPoints CreateRandomPointsTool = new CreateRandomPoints(); This namespace doesn't appear to exist anymore. Have geoprocessing tools moved somewhere else? Also, I'm confused because this page: GitHub - Esri/arcobjects-sdk-community-samples: This repository contains ArcObjects SDK Samples for the ArcObjects SDK 1… shows a lot of sample code that uses that namespace, despite the page being labelled as 10.4.1 examples (and 10.5 elsewhere on the same page).
... View more
09-26-2017
01:28 PM
|
0
|
2
|
1100
|
POST
|
I have a service feature table that is created from an map package that references a file geodatabase. Sometimes when I call RefreshFeatures, the FeatureLayer labels (that I have defined in the map package mxd) do not show. This behavior is not consistent, sometimes they do show as I am creating new features, and sometimes they do not show. The labels defined in the mxd do not have anything special about them except not showing beyond a scale of 10,000. However I am not zoomed out beyond this point. Is there a way to force re-rendering of the labels?
... View more
08-26-2016
06:49 AM
|
0
|
1
|
768
|
POST
|
I should add that I tried to manually recreated the Attribute key/value pairs from the schema, populate them, and commit, but that did not work. No exceptions, just the changes were ignored.
... View more
11-11-2015
02:19 PM
|
0
|
0
|
358
|
POST
|
Hi, I am trying to edit a file geodatabase that is referenced from a map package that I load through a LocalFeatureService. The file geodatabase is not within the map package, it is referencing the file geodatabase which resides elsewhere on disk. Note that due to our workflow, using the SQLite-based .geodatabase format is not an option. I am able to create a MapPoint and add it to the ServiceFeatureTable that represents the points that exist as a feature class in the file geodatabase. I can apply my edits and it shows up in my map and in ArcMap when the file geodatabase is loaded there. However, I can't seem to edit attributes in code. Below is a summary of my code: //set up our service and all tables and feature layers
LocalFeatureService _lfs = await LocalFeatureService.StartAsync(@"D:\dev\HelloWorldMap\HelloWorldMap\Assets\Data\test.mpk");
var url = _lfs.UrlFeatureService;
ServiceFeatureTable _sft = await ServiceFeatureTable.OpenAsync(new Uri(url + "/0"), null, SpatialReference.Create(3857));
_pointsLayer = new FeatureLayer
{
ID = "Points",
DisplayName = "Points",
FeatureTable = _sft
};
//add the point layer to the map
MyMap.Layers.Add(_pointsLayer);
//create a feature using the ServiceFeatureTable's schema...the schema shows the proper fields.
var feature = new GeodatabaseFeature(_sft.Schema); //after this line and before line 21, feature.Attributes is an empty dictionary!
var point = new MapPoint(0, 0);
feature.Geometry = point;
//add the feature to the file geodatabase
long id = await _sft.AddAsync(feature);
//At this point feature.Attributes only shows OBJECTID in the dictionary collection, and it's value is -10
//No other attributes are showing even though the feature.Schema shows all proper fields!
//oh well, let's commit anyway. After this call, the point is added
//permanently to the geodatabase, it's OBJECTID is set as expected, and all other fields are <null>.
var editResult = await _sft.ApplyEditsAsync();
... View more
11-11-2015
02:18 PM
|
0
|
1
|
3268
|
POST
|
I have written some tools to help with mosaic dataset creation. By themselves, these tools work fine. However, whenever I try to chain them together in model builder, the mosaic dataset output of the Create Mosaic Dataset-based tool doesn't work properly as the input of the Add Rasters-based tool. I believe it is an issue with the "add rasters" tool (UpdateMosaicsFromRasterCatalog). I've attached an image to show how the tool stays white even though both inputs are specified. When the model is run, it just stops at the second tool with no error. See code below:
class UpdateMosaicsFromRasterCatalog(object):
...
def getParameterInfo(self):
"""Define parameter definitions"""
param0 = arcpy.Parameter(
displayName="Input Mosaic Dataset",
name="input_mosaic_dataset",
datatype="DEMosaicDataset",
parameterType="Required",
direction="Input")
param1 = arcpy.Parameter(
displayName="Source Raster Catalog(s)",
name="source_raster_catalogs",
datatype="DERasterCatalog",
parameterType="Required",
direction="Input",
multiValue=True)
param2 = arcpy.Parameter(
displayName="Output Mosaic Dataset",
name="outout_mosaic_dataset",
datatype="DEMosaicDataset",
parameterType="Derived",
direction="Output")
param2.parameterDependencies = [param0.name]
return [param0, param1, param2]
def execute(self, parameters, messages):
"""The source code of the tool."""
# Script arguments
mosaicDataset = parameters[0].valueAsText
rasterCatalogs = parameters[1].valueAsText
#split the raster catalogs selected by the user
#and loop through them, adding them to the mosaic
rcList = rasterCatalogs.split(";")
for rc in rcList:
messages.AddMessage("Updating " + mosaicDataset + " from " + rc)
try:
arcpy.AddRastersToMosaicDataset_management(mosaicDataset, "Table", rc, "UPDATE_CELL_SIZES", "UPDATE_BOUNDARY", "NO_OVERVIEWS", "#", "0", "1500", "#", "#", "SUBFOLDERS", "OVERWRITE_DUPLICATES", "NO_PYRAMIDS", "NO_STATISTICS", "NO_THUMBNAILS", "#", "NO_FORCE_SPATIAL_REFERENCE")
except Exception as e:
messages.AddMessage("Update Mosaic Dataset From Raster Catalog failed.")
messages.AddErrorMessage(e.message)
return
[ATTACH=CONFIG]33895[/ATTACH]
... View more
05-19-2014
06:38 AM
|
0
|
0
|
725
|
POST
|
Hello, I am trying to calculate statistics on a referenced mosaic dataset in ArcMap 10.2. It is references a selection from a normal mosaic dataset in the same file gdb which contains DTED elevation data. Trying to calc statistics in ArcMap, ArcCatalog, and through a Model Builder exported Python script all return Error: 999999, Failed to execute (CalculateStatistics). I have rights to the folder and there is plenty of disk space. The script runs all the way to 100% before failing. Any help would be appreciated!
... View more
04-24-2014
08:12 AM
|
0
|
0
|
310
|
POST
|
Hello, When I try to add rasters to an empty mosaic dataset using the GeoEye-1 raster type, it fails with Error:8004205f: No new mosaic dataset item was added. However, I can add a single .pvl file to ArcMap just fine. I am using 10.2. The empty mosaic dataset was created using default values (i.e. no Product type). EDIT: The directory and imagery is not read-only
... View more
03-28-2014
06:04 AM
|
0
|
2
|
1547
|
POST
|
I want to set up a simple model which selects features which have a date field value greater than or equal to a user-specified date. The date field value is also user-specified. The date field and date variables are used in an Expression variable using in-line variable subsitution (%Field% >= #%Date%#). This Expression variable is one of the paramters for the Select Layer by Attribute tool. This all works properly when I manually set the value of the Field and Date variables and then run the model. My question is, how do I get the Field variable to show the fields of the input Table View when the tool is invoked by the user? The drop down of course is empty for the Field parameter.
... View more
05-15-2012
09:44 AM
|
0
|
0
|
543
|
POST
|
Perhaps I didn't understand the requirement correctly and you only need Spatial or 3D Analyst if you have an ArcView or ArcEditor license. It's safe for me to assume they have an ArcInfo license. Calculate Value worked. An added requirement for anyone trying this in the future, remember to set the output table of Summary Statistics as a precondition for the Calculate Value tool.
... View more
03-12-2012
07:22 AM
|
1
|
0
|
484
|
POST
|
Thanks for the reply. It appears you must have Spatial Analyst or 3D Analyst installed to use Calculate Value. I need to pass this custom tool on eventually and I want to make as few assumptions on their environment as possible. Is there any other way to do this?
... View more
03-12-2012
05:46 AM
|
0
|
0
|
484
|
POST
|
Hi, I am running summary statistics in model builder on a table in which the statistics field is a parameter entered by the user (I am using the MAX function on this field). I then need to join the output of summary statistics to the input table (using the calculated statistic as the join field), and then use Copy Rows to export the join to a new table. How do I know what the join field name is for the output of summary statistics? Edit: I am using 9.3.1 if that matters.
... View more
03-09-2012
09:30 AM
|
0
|
5
|
3333
|
Title | Kudos | Posted |
---|---|---|
1 | 03-12-2012 07:22 AM |
Online Status |
Offline
|
Date Last Visited |
04-01-2022
01:28 PM
|