POST
|
Hi, I added TOC Control and Map Control on my form application using Engine 9.1 for VB.NET. And I added a Layer on map. The render of the layer is UniqueValue renderer. But the appearance of legend item on TOC is different from that of ArcMap. The height of TOC Control's Patch size is bigger than that of ArcMap's TOC. I tried to change patch size of TOC, but I couldn't. I started my code like this. Dim pUniqueValueRenderer As IUniqueValueRenderer = New UniqueValueRendererClass()
......
Dim legendInfo As ILegendInfo = pUniqueValueRenderer But I don't know how to code next. Would you help me? Any comment is available. Thank you. .
... View more
08-23-2011
01:05 AM
|
0
|
0
|
542
|
POST
|
Hi, I added TOC Control and Map Control on my form application. And I added a Layer on map. The render of the layer is UniqueValue renderer. But the appearance of legend item on TOC is different from that of ArcMap. The height of TOC Control's Patch size is bigger than that of ArcMap's TOC. I tried to change patch size of TOC, but I couldn't. I started my code like this. Dim legendInfo As ILegendInfo = pUniqueValueRenderer but I don't know how to code next. Would you help me? Any comment is available. Thank you.
... View more
08-21-2011
11:57 PM
|
0
|
0
|
509
|
POST
|
Thanks you, guys I resolved this problem for your helps. My code was changed something like below. Dim pSelected As IEnumFeature = m_Map.FeatureSelection Dim pFeature As IFeature = pSelected.Next() Dim pGeom As IGeometry = pFeature.Shape Dim pHitTest As IHitTest = pGeom Dim pHitPoint As IPoint = New Point pHitTest.HitTest(pPoint, tolerance, esriGeometryHitPartType.esriGeometryPartBoundary, pHitPoint, hitDist, partIndex, vertexIndex, bTrue) ...... Dim pPoints As IPointCollection = pGeom Dim Missing As Object = Type.Missing Dim val As Object If vertexIndex = 0 Then val = 1 pPoints.AddPoint(pHitPoint, val, Missing) Else val = vertexIndex pPoints.AddPoint(pHitPoint, Missing, val) End If pFeature.Shape = CType(pPoints, IGeometry) pFeature.Store() Of course, as dubravko's comment, I created function in my own code. Any Comment is OK. Thanks.
... View more
08-09-2011
07:43 PM
|
1
|
0
|
49
|
POST
|
Thanks again for your kind explanation. But I still have problem. The pHitPoint is a boundary snapped point. I called HitTest function to find out snapped point. Dim pGeom As IGeometry = pFeature.Shape Dim pHitTest As IHitTest = pGeom Dim pHitPoint As IPoint = New Point pHitTest.HitTest(pPoint, tolerance, esriGeometryHitPartType.esriGeometryPartBoundary, pHitPoint, hitDist, partIndex, vertexIndex, bTrue) And at the code "Set pTopOp = pGeom as ITopologicaOperator2", error occures because the type of pGeom is IPointCollection not IPoint, I think. Do you have any idea for resolve this problem?
... View more
08-09-2011
03:44 AM
|
0
|
0
|
49
|
POST
|
Thanks for your reply. I changed pFeature.Shape to pFeature.ShapeCopy, but error occures as same. About ITopologicaOperator2, actually I cann't understand what you mean because of my short knowledge... If you write the code in detail, it'll be very thankful.
... View more
08-08-2011
07:20 PM
|
0
|
0
|
49
|
POST
|
I'd like to implement function to insert vertex on polyline just like in arcmap. When mouse cursor is located on boundary snap on polyline, clicking right mouse button, select insert vertex on popup menu. My code to insert vetex is something like this. ============================================== Dim pSelected As IEnumFeature = m_Map.FeatureSelection Dim pFeature As IFeature = pSelected.Next() Dim pGeom As IGeometry = pFeature.Shape ...... Dim pGeomColn As IGeometryCollection = pGeom Dim pPath As IPath = pGeomColn.Geometry(partIndex) Dim pPoints As IPointCollection = pPath Dim Missing As Object = Type.Missing Dim val As Object If vertexIndex = 0 Then val = 1 pPoints.AddPoint(pHitPoint, val, Missing) Else val = vertexIndex pPoints.AddPoint(pHitPoint, Missing, val) End If Dim pGeom As IGeometry = pPoints pFeature.Shape = pGeom pFeature.Store() ========================================== At line pFeature.Shape = pGeom Error occures like below. "The feature object does not have a valid shaple." Do I missed something else in code? Any advice is OK.
... View more
08-08-2011
03:36 AM
|
0
|
7
|
4436
|
POST
|
Thanks for your reply. Then, conclusionally, can't I use snap function to sketch a line or a point? It's incredible!! Do I have to implement snapping programatically? Is there someone has snapping code? I seem to become to be crazy! Thanks anyway..
... View more
05-20-2011
12:01 AM
|
0
|
0
|
0
|
POST
|
I am developing a GIS App. The environment is ArcEngine9.1 and VB.NET Question is very simple, but something like difficult. Public m_Editor As IEditor Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load m_Editor = New EditorClass End Sub this code occurs an error in VB Editor window. "Because 'ESRI.ArcGIS.Editor.EditorClass.Private Sub New()' is 'Private', this can't be accessed in this context" In ArcEngine9.3, I could use IEngineEditorClass in my application. m_Editor = New EngineEditorClass It was OK but there is no EngineEditor in 9.1. Is there any way to use EditorClass in my own application in 9.1? Because it's imposible to use this class, also I can't use ISnapEnvironment. So I can't use snap funtionality when drawing polyline. Please give me any tip or sample code... Thanks in advance.
... View more
05-19-2011
06:38 PM
|
0
|
2
|
611
|
POST
|
Hi, there I am making an app using ArcGIS Engine 9.1 in VB.NET. I am coding some editing functionality, like draw polyline, point, polygon. But I don't know how to code snapping functionality. As I know, In standard App, It is imposible to use Editor Class. Therefor I can't cast IEditor to ISnapEnvironment. In ArcEngine 9.3, I could code snap function using IEngineEditor, But NOT In 9.1. Is there any way to use snap agent in my own application? Please give me a favor...
... View more
05-18-2011
12:15 AM
|
0
|
0
|
237
|
POST
|
Hi, John. Thanks for your rapid reply. For your kind help, everything is cleared. I'm very happy~~ Thanks again.
... View more
04-19-2011
07:16 PM
|
0
|
0
|
3
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|