POST
|
Does your ArcGIS server account (e.g., arcgis) has the permission to access R.exe and the R script?
... View more
03-10-2014
01:18 PM
|
0
|
0
|
327
|
POST
|
Is your program .NET type? .NET assemblies need to be registered using the regasm utility. Please look into the following help page: -- How to register .NET components with COM -- http://resources.esri.com/help/9.3/arcgisdesktop/dotnet/9826f81b-278c-49cc-a912-ab8d86f5e91e.htm
... View more
08-15-2012
06:22 PM
|
0
|
0
|
191
|
POST
|
In the Visual Studio Add-in 10.1 project, open the Config.esriaddinx file and change the version to 10.0. Then recompile the project, select 'No' to ignore the 'update'. The newly created add-in file ('esriAddIn') can be used to install on ArcGIS 10.0 system. But, again, if there's anything in the addin using new 10.1 functionality, it won't work on 10.0.
... View more
08-08-2012
11:01 AM
|
0
|
0
|
947
|
POST
|
Please refer to the following thread: http://forums.arcgis.com/threads/49406-addin-to-desktop-target-version-implications "Add-Ins targeting previous versions of ArcGIS will automatically load in newer releases, there is no need to rebuild or reinstall them. For example, ArcGIS 10.1 will automatically discover and load add-ins from the 10.0 well-known folder location(C:\Users\<username>\Documents\ArcGIS\AddIns\Desktop10.0)."
... View more
08-06-2012
02:48 PM
|
0
|
0
|
947
|
POST
|
It looks like a defect. You can try to use the 'ICommandItem.FaceId' method. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/FaceID_Property/002300000079000000/ In the following code snippet, change the commandBarID to your UID.
public override void OnClick()
{
IsEnabled = !IsEnabled;
ICommandBars commandBars = m_application.Document.CommandBars;
ESRI.ArcGIS.esriSystem.UID commandBarID = new ESRI.ArcGIS.esriSystem.UIDClass();
commandBarID.Value = "sampleComponent.TogglingCommand";
ICommandItem commandToolBarItem = commandBars.Find(commandBarID, false, false);
if (IsEnabled == true)
{
commandToolBarItem.FaceID = ESRI.ArcGIS.ADF.COMSupport.OLE.GetIPictureDispFromBitmap(Resources.GenerateCalloutsTrue);
}
else
{
commandToolBarItem.FaceID = ESRI.ArcGIS.ADF.COMSupport.OLE.GetIPictureDispFromBitmap(Resources.GenerateCalloutsFalse);
}
commandToolBarItem.Refresh();
}
... View more
07-27-2012
02:01 PM
|
0
|
0
|
208
|
POST
|
The SpecificVersion=False is for VSS build utilities. The Runtime determines the correct assembly from the original assembly reference and any redirection specified in the configuration files, and determines the version that should be bound to the calling assembly. Please look into the following help file for more information: How the Runtime Locates Assemblies http://msdn.microsoft.com/en-us/library/yx7xezcf.aspx
... View more
07-26-2012
04:18 PM
|
0
|
0
|
134
|
POST
|
You need a space before 'Then'. Dim blockCode As String = "dim getValue" & vbNewLine & "If [FName] = " & """xxxx""" & " Then" & vbNewLine & "getValue = [Distance] - 40" & vbNewLine & "Else" & vbNewLine & "getValue = [Distance]" & vbNewLine & "End If"
... View more
07-26-2012
03:29 PM
|
0
|
0
|
140
|
POST
|
RasterDef is required for a raster field. Please look into 'Remarks' section of the following help file. -- IFieldEdit2 Interface -- http://help.arcgis.com/en/sdk/10.0/arcobjects_cpp/componenthelp/index.html#//000s00000348000000 // Create a RasterDef. IRasterDef rasterDef = new RasterDefClass(); rasterDef.Description = "Raster Field"; rasterDef.IsManaged = true; rasterDef.SpatialReference = spatialRef; // Create a raster field. IField field = new FieldClass(); IFieldEdit2 fieldEdit2 = (IFieldEdit2)field; fieldEdit2.Name_2 = "Raster"; fieldEdit2.Type_2 = esriFieldType.esriFieldTypeRaster; fieldEdit2.RasterDef = rasterDef; // Add the field to the feature class. featureClass.AddField(field);
... View more
07-26-2012
02:59 PM
|
0
|
0
|
253
|
POST
|
Yes, you still need to create IWorkspaceFactory and IFeatureWorkspace objects as shown in the sample code.
...
// Create a new ShapefileWorkspaceFactory CoClass to create a new workspace
ESRI.ArcGIS.Geodatabase.IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesFile.ShapefileWorkspaceFactoryClass();
// System.IO.Path.GetDirectoryName(shapefileLocation) returns the directory part of the string. Example: "C:\test\"
ESRI.ArcGIS.Geodatabase.IFeatureWorkspace featureWorkspace = (ESRI.ArcGIS.Geodatabase.IFeatureWorkspace)workspaceFactory.OpenFromFile(System.IO.Path.GetDirectoryName(shapefileLocation), 0); // Explicit Cast
// System.IO.Path.GetFileNameWithoutExtension(shapefileLocation) returns the base filename (without extension). Example: "cities"
ESRI.ArcGIS.Geodatabase.IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(System.IO.Path.GetFileNameWithoutExtension(shapefileLocation));
....
Hi Feng Thanks for your comment.I will test tour point tomorrow.Do you think I still need to instantiate workspaceFactory and featureWorkspace form IWorkspaceFactory and IWorkspace? Can I just instantiate the IFeatureClass and retrieve the fields of the shapefile? Thanks again for your comment
... View more
07-26-2012
07:17 AM
|
0
|
0
|
527
|
POST
|
Please refer to the following code snippets: -- Add Shapefile Using OpenFileDialog Snippet -- http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//00490000005m000000 Basically, you do like this: string shapefileLocation = openFileDialog.FileName; ... ESRI.ArcGIS.Geodatabase.IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(System.IO.Path.GetFileNameWithoutExtension(shapefileLocation)); Hi, I tried to figure this out alot but I am really stuck! I would like to list fields of a selected shapefile by using OpenFileDialog class but I am getting error on IFeatureClass featureClass part.I think should not use the OpenFeatureClass() method here but honestly I am just lost! Can you please take a look at following code and point me what I am doing wrong?Do I really need to create all of Workspaces to access a shapefile in C#? OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "Shapefiles (*.shp)|*.shp"; if (ofd.ShowDialog() == DialogResult.OK) { string path = ofd.FileName; fieldName = ofd.SafeFileName; try { ESRI.ArcGIS.Geodatabase.IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesFile.ShapefileWorkspaceFactoryClass(); ESRI.ArcGIS.Geodatabase.IWorkspace workspace = workspaceFactory.OpenFromFile(ofd.FileName, 0); ESRI.ArcGIS.Geodatabase.IFeatureWorkspace featureWorkspace = (ESRI.ArcGIS.Geodatabase.IFeatureWorkspace)workspace; // Explict Cast ESRI.ArcGIS.Geodatabase.IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(ofd.SafeFileName); IFields fields = featureClass.Fields; IField field = null; // On a zero based index, iterate through the fields in the collection. for (int i = 0; i < fields.FieldCount; i++) { // Get the field at the given index. field = fields.get_Field(i); if (field.Name != field.AliasName) { listBox1.Items.Add(field.Name); } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); }
... View more
07-25-2012
04:21 PM
|
0
|
0
|
527
|
POST
|
You may want to check the OnLayerChanged method of the FeatureLayer class. Clear graphics in the old graphic layer when this is raised; and re-create graphics using the Graphics property of the FeatureLayer class based on your requirements. Hi, I have a feature service layer with 24(!) classes and I would like to add some interactive labels to help distinguish between similar symbol fills (I also need to sort out picture fills that work in ArcGIS Desktop and the Runtime). I've seen some posts regarding creating a graphics layer from the feature layer but I wonder how this will work if new features are being added. Will the graphics layer need to be recreated each time a new feature is added? Can the new features be captured with draw events and added to the graphics layer incrementally? Not sure what the easiest/best method would be. Thanks, Matt
... View more
07-25-2012
04:06 PM
|
0
|
0
|
221
|
POST
|
On Windows, after install the Java Runtime SDK, you may need to reboot the system before creating a Runtime SDK project. This will make sure the ARCGISRUNTIMESDKJAVA_1_0 will be added to the project environment variables list. I installed the Java Runtime SDK 10.1 pre-release on Windows 7 and this "ARCGISRUNTIMESDKJAVA_1_0" environment variable did not get set up at all. All it did was keep me from running the samples right out of the box from the shortcut put in the programs menu. It is a minor nuisance once I recognized it. I set one up and the sample jar ran fine after that. It happened to a coworker as well. So it is not an isolated case, but just in case anyone else runs into it. Just set the variable to your path. Mine was "C:\Program Files (x86)\ArcGIS SDKs\Java1.0" I don't know if it was intentional or not (i.e., by design) to not set that. I deduced it from the error running the jar via the java -jar <jar filename> at a command/shell prompt. Hope that helps someone looking for answers... Does this belong in a different forum? (please feel free to move it) I never can tell, I rarely post.
... View more
07-20-2012
04:11 PM
|
0
|
0
|
632
|
POST
|
It does not seem to be feasible only by changing the Config.esriaddinx file. This line <... library="MyNamespace.MyAddin.dll" ...> limits the file for searching the extensions. However, you can load extension from other project by using AddIn.FromID function. Please look into the following help page for details. -- Add-in coding patterns -- http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Add_in_coding_patterns/0001000000zz000000/
... View more
07-20-2012
10:34 AM
|
0
|
0
|
135
|
POST
|
An obtuse triangle is a triangle in which one of the angles is an obtuse angle. The returned angle is the smaller angle formed by an imaginary line from the first to the second point and the second to the third point. Therefore, you may need to check all three angles to decide. The measure of the constructed angle is between -Pi and Pi. The conversion from is correct. Should I just multiply by 180/pi to convert from radians to degrees and see if its greater than 90 degrees??
... View more
07-20-2012
10:06 AM
|
0
|
0
|
269
|
POST
|
Please try to replace the following two lines: Dim classSchemaEdit As ESRI.ArcGIS.Geodatabase.IClassSchemaEdit3 classSchemaEdit = DirectCast(featureClass2, ESRI.ArcGIS.Geodatabase.IClassSchemaEdit3) with Dim classSchemaEdit As IClassSchemaEdit3 = TryCast(featureClass2, IClassSchemaEdit3) Thanks a lot feng.zhang.esri. It continues without me working. On having come to the new code it gives the following mistake: "It is not possible to turn the object COM of the type ' System. __ ComObject ' to the type of interface ' ESRI.ArcGIS.Geodatabase. IClassSchemaEdit3 '. A mistake of operation happened due to the fact that the so called QueryInterface in the component COM for the interface with IID ' {4B35F814-0417-47E3-8DFC-CAD58746693B} ' generated the following mistake: not compatible Interface (HRESULT's Exception: 0x80004002 (E_NOINTERFACE))." Also I have tried with CType instead of DirectCast and neither it works. regards.
... View more
07-12-2012
08:53 AM
|
0
|
0
|
679
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|