|
POST
|
Check this blog post: http://blogs.esri.com/esri/arcgis/2012/08/27/python-add-ins-how-to-add-built-in-commands-to-your-custom-toolbar-or-menu/
... View more
05-03-2014
09:32 PM
|
0
|
0
|
436
|
|
POST
|
Your code should work fine. If you method returns an object you should be connected.
... View more
05-03-2014
09:28 PM
|
0
|
0
|
1647
|
|
POST
|
It's about aspect ratio of your map. Try to keep Width/Height ration near 1.0
... View more
04-30-2014
12:25 AM
|
0
|
0
|
1663
|
|
POST
|
Hi Husham, We should break down this into few points: First you need to select your parcel and you may use query task. then you need to get your Adjacent parcels so you should make a spatial query and set your Spatial Relationship to "esriSpatialRelTouches" to get the parcels that touches the border of your first parcel. After getting your parcels you can add new attribute with your numbers or order. using the Number Attribute you can make a custom Symbol to show labels. It may contains a TextBlock that bind your text to Number value. You can Add labels either in a different graphics layer with parcel's center point or in the same graphics layer with customized fill symbol. To dispaly your features in a Data Grid you can use the FeatureDatagrid. Generally you can start with Spatial Query Sample. I have also attached sample code to demonstrate the concept. Regards,
... View more
04-28-2014
12:23 AM
|
0
|
0
|
946
|
|
POST
|
You can just handle Extent Changing event for your map to sync the extent for both maps. There is a similar sample called Swipe Map, check it out https://developers.arcgis.com/silverlight/sample-code/start.htm#SwipeMap
... View more
04-27-2014
09:06 PM
|
0
|
0
|
263
|
|
POST
|
it should be the entire path of the file // For example, connectionFile = @"C:\myData\Connection to Kona.sde".
public static IWorkspace ArcSdeWorkspaceFromFile(String connectionFile)
{
Type factoryType = Type.GetTypeFromProgID(
"esriDataSourcesGDB.SdeWorkspaceFactory");
IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance
(factoryType);
return workspaceFactory.OpenFromFile(connectionFile, 0);
} once you get your IFeatureWorkspace, you can get your featureclass/table for more info: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000003s8000000 http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/IFeatureWorkspace_Interface/002500000317000000/
... View more
04-27-2014
08:42 AM
|
0
|
0
|
1647
|
|
POST
|
you should debug your code to catch the exception, but at first glance you can check this line _pdq.WhereClause = PersonsTable.FIRST_NAME = "JAMARI" it should be something like the following: _pdq.WhereClause = PersonsTable.FIRST_NAME + " = 'JAMARI'";
... View more
04-27-2014
08:29 AM
|
0
|
0
|
1220
|
|
POST
|
You can get your first record using your cursor, just get your next row for one time and then get your integer value. private static int GenericQuery(string sQueryColumn, string sFrom, string sWhere)
{
ICursor pCursor = null;
try
{
IQueryDef pQD = pFeatureWorkspace.CreateQueryDef();
pQD.Tables = sFrom;
pQD.SubFields = sQueryColumn;
pQD.WhereClause = sWhere;
pCursor = pQD.Evaluate();
//Get the first Row
IRow pRow = pCursor.NextRow();
//Get your integer value
if (pRow != null)
{
object myObject = pRow.get_Value(lIndex);
if (myObject != null)
{
return Convert.ToInt32(myObject);
}
}
return -1;//Default value
}
catch (Exception)
{
return -1;
}
finally
{
if (pCursor!=null)
{
Marshal.FinalReleaseComObject(pCursor);
}
}
}
... View more
04-27-2014
12:42 AM
|
0
|
0
|
1220
|
|
POST
|
Your values should be comma separated and inside Brackets for IN operator ex: "Code_Pref IN (value1,value2,value3,..)" It should be something like the following:
if (listcode.Count>0)
{
mquery.Where = "Code_Pref IN (" + string.Join(",", listcode.Select(x => x.ToString()).ToArray()) + ")";
} Regards,
... View more
04-26-2014
10:21 PM
|
0
|
0
|
364
|
|
POST
|
For ArcGIS 10+ applications,you should target X86 platform even on a 64-bit machine. The ArcObjects Primary Interop Assemblies (PIAs) now target the X86 platform. Since ArcObjects PIAs are 32-bit applications, this modification allows you to safely run your ArcObjects applications on a 64-bit machine. The X86 target platform specifies to the common language runtime (CLR) that the assemblies must run as 32-bit processes, even on a 64-bit machine. For more information on the impact of this modification and how to modify your project settings to target the X86 platform, see Migrating ArcGIS 9.3 Desktop and Engine custom components to ArcGIS 10. More Information: http://resources.arcgis.com/en/help/arcobjects-net/conceptualHelp/index.html#/What_s_new_at_10/0001000002zp000000/ Regards,
... View more
04-26-2014
09:33 PM
|
0
|
0
|
1660
|
|
POST
|
Based on This Post you can get the approximate intersection point of two lines.
public IPoint GetLinesIntersection(IPoint line1P1, IPoint line1P2, IPoint line2P1, IPoint line2P2)
{
//Line 1 (p1, p2)
var A1 = line1P2.Y - line1P1.Y;
var B1 = line1P1.X - line1P2.X;
var C1 = A1 * line1P1.X + B1 * line1P1.Y;
//Line 2 (p3, p4)
var A2 = line2P2.Y - line2P1.Y;
var B2 = line2P1.X - line2P2.X;
var C2 = A2 * line2P1.X + B2 * line2P1.Y;
var determinate = A1 * B2 - A2 * B1;
IPoint intersectionPoint;
if (determinate != 0)
{
double x = (B2 * C1 - B1 * C2) / determinate;
double y = (A1 * C2 - A2 * C1) / determinate;
intersectionPoint = new Point();
intersectionPoint.X = x;
intersectionPoint.Y = y;
}
else //lines are parrallel
intersectionPoint = null;
return intersectionPoint;
}
Regards,
... View more
04-22-2014
03:07 AM
|
0
|
0
|
980
|
|
POST
|
Geometry service will work on geometries only, you should keep your multi point list and try populate attributes in Intersect Completed event. you may compare results with its coordinates. check these posts: http://forums.arcgis.com/threads/103924-GeometryService-issue-with-Attributes http://forums.arcgis.com/threads/28341-Why-does-the-intersect-from-Geometry-service-doesn-t-return-attributes
... View more
04-14-2014
09:40 AM
|
0
|
0
|
289
|
|
POST
|
Hi ravi, Check this sample for using published geoprocessing services in Arcobjects: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000001qn000000 Regards,
... View more
04-12-2014
07:32 AM
|
0
|
0
|
333
|
|
POST
|
To get the value form your row you should pass the column name row.getValue("FieldName"), in your code you get the column name from the Cursor "cur.SiteStreet" which is incorrect syntax. Try the following:
field = "SiteStreet"
row.getValue(field)
... View more
04-10-2014
04:13 AM
|
0
|
0
|
1364
|
|
POST
|
This approach should work for you
if not row.CNT_PT_ID :
cur.deleteRow(row)
... View more
04-10-2014
03:56 AM
|
0
|
0
|
1324
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-22-2015 06:50 AM | |
| 1 | 04-01-2014 10:01 PM | |
| 1 | 04-07-2014 11:18 PM | |
| 1 | 04-08-2014 09:19 PM | |
| 1 | 11-26-2014 07:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|