POST
|
Thanks for your reply, Joe. But in ArcMap this functionality has been provided not using graphics. It is something other. Can you give me any other idea?
... View more
06-17-2012
10:44 PM
|
0
|
0
|
266
|
POST
|
Thanks for all replies. But when I select a row (from selected rows) in attribute table of ArcMap, ArcMap highlights the feature on map. I want to do the same. If ArcMap has this functionality, I think it must be possible for custom application too. Am I wrong?
... View more
06-17-2012
08:39 PM
|
0
|
0
|
266
|
POST
|
Hello. I want to make a new selection from an existing selection, keep the old selection and change the highlight color of the new selection. Can you give me any idea? Thanks.
... View more
06-14-2012
03:24 AM
|
0
|
7
|
502
|
POST
|
The problem solved. http://forums.esri.com/Thread.asp?c=93&f=1170&t=294986
... View more
05-24-2012
01:58 AM
|
0
|
0
|
165
|
POST
|
Hello. I want to read JPG image from attribute table field and to display it in PictureBox control. The attribute table field type is RASTER. I found code for BLOB type. public void ReadPictureFromAttributeTable(IRow m_row) { IFields fields = m_row.Fields; int m_BlobFieldIndex = fields.FindField("PHOTO"); IField field = fields.get_Field(m_BlobFieldIndex); if (field.Type == esriFieldType.esriFieldTypeBlob) { IMemoryBlobStream memoryBlobStream = (IMemoryBlobStream)m_row.get_Value(m_BlobFieldIndex); pictureBox1.Image = memoryBlobStream as Image; } } But I want to get image from RASTER type field. Can aneone help me? Thanks.
... View more
05-23-2012
01:56 AM
|
0
|
1
|
298
|
POST
|
If the point collection contains no points then the two geometries do not intersect in such a way that the intersection is defined as a point. If your goal is simply to determine if two polylines share a spatial relationship with each other then you may be better served by calling IRelationalOperator.Disjoint. Thanks Neil. It worked. It is the best solution for my problem. Thanks.
... View more
05-17-2012
08:50 PM
|
0
|
0
|
378
|
POST
|
The Intersect method returns a point collection when called using the 0-dimension flag. Your code should check that this point collection is not null as well as check to make sure the point collection contains at least one point. I changed the code:
private bool CheckIntersection(IFeature feat1, IFeature feat2)
{
IPolyline pLine1, pLine2;
pLine1 = feat1.Shape as IPolyline;
pLine2 = feat2.Shape as IPolyline;
ITopologicalOperator topoOp = pLine1 as ITopologicalOperator;
IGeometry pGeom = topoOp.Intersect(pLine2, esriGeometryDimension.esriGeometry0Dimension);
IPointCollection pcol = pGeom as IPointCollection;
MessageBox.Show(pcol.PointCount.ToString());
if (pcol.PointCount == 0)
{
return false;
}
else return true;
}
But now MessageBox.Show(...) function returns only "0", CheckIntersection(...) function returns only false.
... View more
05-17-2012
06:18 AM
|
0
|
0
|
378
|
POST
|
The problem is that you're casting from IFeature to IPolyline. This is an invalid cast. You need to be getting the Shape of the feature and casting that to IPolyline, not the feature object itself. Hello Neil. Thanks for reply. I changed the code:
private bool CheckIntersection(IFeature feat1, IFeature feat2)
{
IPolyline pLine1, pLine2;
pLine1 = feat1.Shape as IPolyline;
pLine2 = feat2.Shape as IPolyline;
ITopologicalOperator topoOp = pLine1 as ITopologicalOperator;
IGeometry pGeom = topoOp.Intersect(pLine2, esriGeometryDimension.esriGeometry0Dimension);
if (pGeom == null)
{
return false;
}
else return true;
}
I tested this function with different features. But the function returns only true; Can you help me solve this problem? Thanks.
... View more
05-17-2012
05:44 AM
|
0
|
0
|
378
|
POST
|
Hello. I want to get bool result of intersection of two polyline features. The Code: private bool CheckIntersection(IFeature feat1, IFeature feat2) { IPolyline pLine1, pLine2; pLine1 = feat1 as IPolyline; pLine2 = feat2 as IPolyline; ITopologicalOperator topoOp = pLine1 as ITopologicalOperator; IGeometry pGeom = topoOp.Intersect(pLine2, esriGeometryDimension.esriGeometry0Dimension); //Here I get this error: System.NullReferenceException: //Object reference not set to an instance of an object. if (pGeom == null) { return false; } else return true; } Can anyone help me? Thanks.
... View more
05-17-2012
01:52 AM
|
0
|
6
|
803
|
POST
|
Hello. I need help for adding custum Base Tool item into ToolBarControl. I have add this Base Tool into the project. But when I add this item with following code into ToolBarControl, Visual Studio sends this error: "The supplied command is invalid" private void MainForm_Load(object sender, EventArgs e) { ... axToolbarControl1.AddItem("MyMapApplication.CameraTool", -1, -1, false, 0,esriCommandStyles.esriCommandStyleIconAndText); } But when I add a new project into the solution and add this Base Tool into this project (into new project) the code is working. But I need that, the Base Tool and other classes be in same project. Because I want to get other class properties from this Base Tool class. Can anyone help me solve this problem?
... View more
05-06-2012
11:36 PM
|
0
|
0
|
366
|
POST
|
Thanks everyone. I found solution of my problem. In Path name of Visual Studio project files was '&' symbol. I deleted this symbol from folder name and the problem solved.
... View more
04-04-2012
09:04 PM
|
0
|
0
|
166
|
POST
|
The error says: An error occurred while parsing EntityName. Line 2, position 42. I attached screenshot of MainForm.Design.cs file and MainForm.cs file.
... View more
04-04-2012
08:49 PM
|
0
|
0
|
166
|
POST
|
Hello. I have a problem with creating a MapControlApplication using Visual Studio 2008. There is an error in Design view of the application. I am using Engine 10. But when I create a GlobeControlApplication everything is ok, the application is working. I don't know what is problem? I have attached a screenshot of error. Can anyone help me?
... View more
04-04-2012
06:12 AM
|
0
|
3
|
378
|
POST
|
Thanks for your answer, Robert. This is very useful for displaying image on map. But I want displaying online video of camera. Can you give me an idea for solving this problem? Thanks in advance!
... View more
02-29-2012
04:07 AM
|
0
|
0
|
456
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|