POST
|
I have seen this code in Arcpy which is used to create a Polygon from a string of Points(X , Y).Can you please let me know how I can us something like this which can generate polygon from an array of X,y values in C# and Arcobjects? I already take alook at Arcobjects 10 .net framework sample code sample of Building a Polygon Using Points . but it was too confusing for me. I really appreciate your time if you can point me to a tutorial or a sample which contains a process of polygon creation same as what was in arcpy code. Regards,
... View more
08-01-2012
07:16 AM
|
0
|
1
|
4420
|
POST
|
Can you please let me know (or point me to a tutorial?) how to display a shapefile attribute table in C# DataGridView? Thanks
... View more
07-30-2012
01:22 PM
|
0
|
5
|
4959
|
POST
|
Hi, I already asked this question"How to create 3d drillhole " in ArcGIS 3D Analysis Froum and I knew some one (Neil Ayres) has created an Arcpy script in python which enable to create 3D line form a tabular data(Unfortunately I could'nt figure it out how to use my table's Dip and Azimuth values in this example and how and where "gavin burgess" got thos XMax,XMin,YMax,YMin(s)?). Can you please let me know if this is possible to create a 3d line from Arcpy , based on a survey point data like this? [ATTACH=CONFIG]16446[/ATTACH] I really appreciate if you can help me to find a way to convert the table value to 3d trough Arcpy. Regards,
... View more
07-27-2012
09:29 AM
|
0
|
0
|
795
|
POST
|
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-25-2012
05:38 PM
|
0
|
0
|
528
|
POST
|
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
02:42 PM
|
0
|
5
|
2503
|
POST
|
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_create_an_application_to_run_on_a_schedule/0001000002nt000000/ Thanks Apray1, This helped a lot.
... View more
07-25-2012
09:12 AM
|
0
|
0
|
922
|
POST
|
Hi Neil, No , I am running the code with VS 2010.Yes I am using ArcGIS 10.Can you please let me know how I can set the license checkout process? and can you please let me know what exactly you mean by this part of your comment? If you are using ArcGIS 10, then you also need to bind to a product before attempting to check out the license. Thanks for your time and comment,
... View more
07-24-2012
01:15 PM
|
0
|
0
|
922
|
POST
|
Using this sample code :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
namespace Arc_1
{
public partial class Form1 : Form
{
private string path = @"D:\ArcObjects\myfGDB.gdb";
public Form1()
{
InitializeComponent();
}
public static IWorkspace FileGdbWorkspaceFromPath(String path)
{
Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.FileGDBWorkspaceFactory");
IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType);
return workspaceFactory.OpenFromFile(path, 0);
}
private void button1_Click(object sender, EventArgs e)
{
FileGdbWorkspaceFromPath(path);
MessageBox.Show("You are connected now");
}
}
}
But I am encountering with this error Retrieving the COM class factory for component with CLSID {71FE75F0-EA0C-4406-873E-B7D53748AE7E} failed due to the following error: 80040111. I changed the project .Net framework from 4 to 3.5 client but smae thing still happening! Can you please let me know why this is happening? Thanks
... View more
07-24-2012
09:02 AM
|
0
|
4
|
5983
|
POST
|
Hi kenbuja, Thanks for perfect links.I just have a quick question here, the link for Creating fields is perfect and thanks for that but as I mentioned I do not know how I can add this field to a specific EXISTING shapefile. I really have problem with this part.Honestly I do not know how to navigate to an exiting file(shapefile) and add the fields there! Can you please let me know how I can do this? Regards,
... View more
07-23-2012
08:41 AM
|
0
|
0
|
403
|
POST
|
Hi, Can someone please help me to figure out how to get list of attribute fields name from a shapefile? For example , let's say I have a shapefile called "NewDH.shp" stored at "D://GIS" how I can list the attributes(field's name). I also appreciate if you can let me know how I can add a new field to the above mentioned shapefile suing C# I think this is the best way to understand how Arcobjects work with c#. Regards,
... View more
07-22-2012
05:26 PM
|
0
|
3
|
3354
|
POST
|
Hi, Can you please let me know how I can run an Arcpy script to add field(s) to all shapefiles inside a folder.I already tried this script but it did'nt I am encountering with Error ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Table: Dataset Point.shp does not exist or is not supported Failed to execute (AddField). import arcpy import os dirAd = "D:\GIS\Test" fieldName1 = "ref_ID" fieldPrecision = 9 fieldAlias = "refcode" fieldName2 = "status" fieldLength = 10 for files in os.listdir(dirAd): if files.endswith(".shp"): arcpy.AddField_management(files, fieldName1, "LONG", fieldPrecision, "", "",fieldAlias, "NULLABLE") arcpy.AddField_management(files, fieldName2, "TEXT", "", "", fieldLength) Thanks
... View more
07-09-2012
08:30 AM
|
0
|
3
|
844
|
POST
|
Hi I have some drilling information for drillholes and I do not know if it is possible to create 3D drill trace using ArcGIS 3D Extension(I know that this is possible by using some third party tools like Traget but I really need to do this in ArcMap). What I have are is: DrillHole_ID,Easting,Northing,Azimuth,Dip,Srart,End,Lenght I know how to generate 3D model of points which has no angles but az you can see I have to consider the angles here, so Can you please let me know how I can do it? I tried to find a tutorial on the web but I couldt find any thing! Thanks for your help
... View more
04-21-2012
05:48 PM
|
0
|
6
|
13167
|
POST
|
Hi jbswain, Perfect, Thanks for your help.I have never worked with that tool, I am going to try it now. Thanks again
... View more
03-07-2012
04:55 AM
|
0
|
0
|
989
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|