|
POST
|
This is what I'm looking for. Thanks a lot. This can be a stupid question. but how can i call this? and from where should I call this? I implement a BaseToolbar and BaseCommand . Should I call it from one of those? when I do this on the click event on the BaseCommand class , I need to pass paramaters... GetXY newGetXY = new GetXY(); newGetXY.OnMouseDown(); // need to pass arguments.. Please help on how i can call the GetXY method and from where? Hi, Please check the url.. http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/concepts_start.htm#01c01659-cdf8-4579-9c87-2b965e872d84.htm
... View more
12-21-2010
07:09 PM
|
0
|
0
|
2641
|
|
POST
|
I've already tried the first solution before attempting to use the active view. As for the second, I'm not looking to use the GUI, this is a console app, therefore IApplication / IMxDocument is not going to work for me. There are different options 1) You need to get reference of IApplication ..if you want to get mxd source path 2) or you need to write a code pure C# code to get file path...
... View more
12-21-2010
07:05 PM
|
0
|
0
|
1302
|
|
POST
|
Hi! No it does not work. It stops animating when the Map is busy. I've successfully cerated a statusindicator that animates even when the Map is busy. So the biggest problem is finding events to start and stop the animation. Sub ProgDialog() Dim pProDlgFact As IProgressDialogFactory Dim pStepPro As IStepProgressor Dim pProDlg As IProgressDialog2 Dim pTrkCan As ITrackCancel Dim boolCont As Boolean Dim i As Long ' Create a CancelTracker Set pTrkCan = New CancelTracker ' Create the ProgressDialog. This automatically displays the dialog Set pProDlgFact = New ProgressDialogFactory Set pProDlg = pProDlgFact.Create(pTrkCan, Application.hWnd) ' Set the properties of the ProgressDialog pProDlg.CancelEnabled = True pProDlg.Description = "This is counting to 10000." pProDlg.Title = "Counting..." pProDlg.Animation = esriDownloadFile ' Set the properties of the Step Progressor Set pStepPro = pProDlg pStepPro.MinRange = 0 pStepPro.MaxRange = 10000 pStepPro.StepValue = 1 pStepPro.Message = "Hello" ' Step. Do your big process here. boolCont = True For i = 0 To 10000 Application.StatusBar.Message(0) = Str(i) 'Check if the cancel button was pressed. If so, stop process boolCont = pTrkCan.Continue If Not boolCont Then Exit For End If Next i End Sub
... View more
12-21-2010
02:45 AM
|
0
|
0
|
1815
|
|
POST
|
I have created a custom toolbar that has a couple of ESRI tools on it that do not have a default button image. How can I set an image for these buttons on my toolbar? I can create/add a button image on custom tools that I add on my toolbar, but can't figure out how to set an image for the ESRI tools. For example on my toolbar I have the Merge command (comes from Editor > Merge), added to the toolbar in vb.net using AddItem("esriEditor.MergeCommand") This tool has no default image, just the text "Merge" - I want to set an image on my toolbar. Thanks, Mike. http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/a7e6a803-d80b-43bf-984c-428f0133e6e9.htm
... View more
12-21-2010
01:18 AM
|
0
|
0
|
655
|
|
POST
|
I'm having the same issue. Features that I just digitized are disappearing. When I zoom out they re-appear. I don't have any scale dependencies set. ArcMap version 10 SP1. Anyone know what is going on? Featurelayer might be scaled or something ?
... View more
12-20-2010
07:53 PM
|
0
|
0
|
2267
|
|
POST
|
Hi! all sorry post problem to arcobject. coz i can't find forum for arcgis Engine. i have problem with arcgis engine runtime on visual studio 2008. any one know how to create map overview and coding. thank you Hi, This is right place to post your question ... and here is your answer.. http://resources.esri.com/help/9.3/ArcGISEngine/dotnet/1187A916-4424-4492-A7AA-1AFCB6C03A3A.htm
... View more
12-20-2010
07:22 PM
|
0
|
0
|
924
|
|
POST
|
Can anybody please give me a clear idea about the difference between Class & CoClass and Inbound & Outbound Interfaces. Thanks in advance. Objects and Classes ArcObjects consists of objects and classes. 3 An object represents a spatial feature such as a road or a vegetation stand. In a geodatabase, an object corresponds to a row in a table and the object�??s attributes appear in columns. A class is a set of objects with similar attributes. An ArcObjects class can have built-in interfaces, properties, and methods. ArcObjects includes three types of classes: The most common type is the coclass. A coclass can be used to create new objects. For example, FeatureClass is a coclass that allows new feature class objects to be created as instances of the coclass. The second type is the abstract class. An abstract class cannot be used to create new objects, but it exists so that other classes (i.e., subclasses) can use or share the properties and methods that the class supports. For example, GeoDataset is an abstract class. The class exists so that geographic datasets such as feature classes and raster datasets can all share the properties of extent and spatial reference that the GeoDataset class supports. The third type is the class. A class cannot be used directly to create new objects; instead, objects of a class can only be created from another class. For example, EnumInvalidObject is a noncreatable class because an EnumInvalidObject can only be obtained from another object such as a data conversion object. When converting a shapefile from one coordinate system to another, for example, a data conversion object automatically creates an EnumInvalidObject to keep track of those objects that have failed to be converted
... View more
12-20-2010
07:19 PM
|
0
|
0
|
825
|
|
POST
|
Hi, New to ArcObjects - I have a point in an .mxd layer that I would like to change via user interaction on a form (button click). However, when I run my application and click to update the point, the existing point in the target layer completely disappears. Can anyone point me in the right direction? IMxDocument _mxDoc = (IMxDocument)_doc; IMap map = (IMap)_mxDoc.FocusMap; IGeoFeatureLayer gLayer = (IGeoFeatureLayer)map.get_Layer(2); IRgbColor pColor = new RgbColorClass(); pColor.Red = 255; pColor.Green = 255; pColor.Blue = 0; ISimpleMarkerSymbol sMarker = new SimpleMarkerSymbol(); sMarker.Color = pColor; sMarker.Style = esriSimpleMarkerStyle.esriSMSDiamond; sMarker.Size = 20; ISimpleRenderer sRender = (ISimpleRenderer)gLayer.Renderer; sRender.Symbol = (ISymbol)sMarker; gLayer.Renderer = (IFeatureRenderer)sRender; IActiveView vActive = (IActiveView)map; vActive.Refresh(); what _doc is it Iapplication instance ? please can you send me complete code so that i understand the issue...
... View more
12-20-2010
07:11 PM
|
0
|
0
|
540
|
|
POST
|
Good one... but still we have lots of same option in Arctoolbox right ?
... View more
12-19-2010
08:35 PM
|
0
|
1
|
638
|
|
POST
|
Hi, I have XY value tabel having with NAD 27 Zone 6, I want convert this vales to NAD 83 Zone 6. Thanks, GM You need to alter the projection...using ArcCatlog
... View more
12-19-2010
08:30 PM
|
0
|
0
|
2571
|
|
POST
|
I have to draw manys points(more than 50,000) in a short time. Do you know how to make many points to be one object(for example,union all points to be one object) which can be show in map? I do not think that it is MultiPointClass, for ArcGis draw it with point by point. I need another object which only need draw once. when we show or draw the object, all points can be draw in a short time like a picture. thank you. Tell me what exactly your are looking for ?..or send me screen.. so that i can guide you...
... View more
12-19-2010
08:24 PM
|
0
|
0
|
446
|
|
POST
|
Hello, We have developed an ArcEngine 9.3.1 application. It typically loads a map document by calling LoadMxFile and then zooms to a location on the map. The mxd file can have multiple mastermap layers and rasters. The document is saved zoomed at the relevant area of interest �?? in this case the whole of the UK. The LoadMxFile call can take a long time to complete resulting in poor performance. Can you suggest a way of improving application performance, especially in situations where we know that we intend to zoom in on a different location? Is it possible to call the loadMx method asynchronously and then cancel the drawing of the layers and zoom to a location? We want to be able to do this programmatically. Thanks, Harsha You can scaling data ...you can increase your map performance...!
... View more
12-17-2010
01:31 AM
|
0
|
0
|
952
|
|
POST
|
I am looking for some help retrieving specific attribute values from a shapefile. I want to search my attributes based on state name, and then populate a textbox with the states population, but I am having trouble figuring out how to access/retrieve the data in my attribute table. Any help/pointers would be appreciated. Use IQueryFilter to query the data.... something like this public ICursor GetRestaurants(ITable table) { // Create the query filter. IQueryFilter queryFilter = new QueryFilterClass(); // Select the fields to be returned - the name and address of the businesses. queryFilter.SubFields = "NAME, ADDRESS"; // Set the filter to return only restaurants. queryFilter.WhereClause = "TYPE = 'Restaurant'"; // Use the PostfixClause to alphabetically order the set by name. Although this // has no effect on a File geodatabase, this will work for Personal and SDE // geodatabases. IQueryFilterDefinition queryFilterDef = (IQueryFilterDefinition)queryFilter; queryFilterDef.PostfixClause = "ORDER BY NAME"; ICursor cursor = table.Search(queryFilter, true); return cursor; }
... View more
12-17-2010
01:25 AM
|
0
|
0
|
798
|
|
POST
|
I am using IMapServerDataAccess to get an IRaster using the following: IRaster raster = (IRaster)dataAccess.GetDataSource(mapServer.DefaultMapName, mapLayer); How do I then add that IRaster as an ILayer to ArcMap? I have tried casting IRaster to IRasterLayer with no luck. Do I need to cast the IRaster to another object first? Thanks for any assistance. I am working in C#, but will gladly take other samples if available. Mele public static void AddRasterLayer(ESRI.ArcGIS.Carto.IActiveView activeView, ESRI.ArcGIS.Geodatabase.IRasterDataset rasterDataset, ESRI.ArcGIS.Carto.IRasterRenderer rasterRenderer) { //Create a raster layer from a raster dataset. You can also create a raster layer from a raster. ESRI.ArcGIS.Carto.IRasterLayer rasterLayer = new RasterLayerClass(); rasterLayer.CreateFromDataset(rasterDataset); //Set the raster renderer. The default renderer will be used if passing a null value. if (rasterRenderer != null) { rasterLayer.Renderer = rasterRenderer; } //Add it to a map if the layer is valid. if (rasterLayer != null) { ESRI.ArcGIS.Carto.IMap map = activeView.FocusMap; map.AddLayer((ILayer)rasterLayer); } }
... View more
12-17-2010
01:22 AM
|
0
|
0
|
1104
|
|
POST
|
Hello all, I have written code to intersect two polygon layers, and then calculate the acres of the resulting intersected layer. To verify that my tool is giving accurate info, I've run the same process using ArcToolbox intersect, and then right click the resulting layer's field name, and choosing "Calculate Geometry" to get the acres of the intersected layer. The results from ArcToolbox and the results from my custom tool do not match. I'm getting values for the acres of the intersected layer like: My Custom Tool: ArcToolBox: 108400.148 108423.527 17108.401 17112.09 11624.977 11627.484 85768.753 85787.251 ... So the results of my tool are in the same ball park as what I'm getting back from Toolbox, but I'd like to be able to call the same code that toolbox does when it executes "Calculate Geometry". Does anyone have sample code of how to calculate acres using Calculate Geometry? Here is the code I am currently using: 'Get the first feature. pUpDFCursor = pFeatureclass.Update(Nothing, False) pFeature = pUpDFCursor.NextFeature 'Loop through all features. Do Until pFeature Is Nothing 'Step the progress bar. pStatusBar.StepProgressBar() pArea = pFeature.Shape dblArea = pArea.Area 'Calculate Acres from Area. pFeature.Value(pFeature.Fields.FindField(strField)) = pArea.Area / 4046.85642 'Update all features with newly calculated acres. pUpDFCursor.UpdateFeature(pFeature) pFeature = pUpDFCursor.NextFeature Loop Can I call calculate geometry directly through arcobject? I'm using Visual Studio 2008, .Net. Public Sub t_IArea_polygon() Dim pID As New UID pID = "esriEditor.editor" Dim pEditor As IEditor Dim pApp As IApplication Set pApp = Application Set pEditor = pApp.FindExtensionByCLSID(pID) If pEditor.SelectionCount <> 1 Then MsgBox "select one polygon" Exit Sub End If Dim pEnumFeat As IEnumFeature Dim pFeature As IFeature Dim i As Long Set pEnumFeat = pEditor.EditSelection Dim pArea As IArea Dim pCenter As IPoint Dim pLabel As IPoint Set pCenter = New Point Set pLabel = New Point Set pFeature = pEnumFeat.Next While Not pFeature Is Nothing If pFeature.Shape.GeometryType = esriGeometryPolygon Then Set pArea = pFeature.Shape MsgBox "+++Polygon::IArea properties..." & vbCrLf _ & "Area = " & pArea.Area & vbCrLf _ & "Center.X = " & pArea.Centroid.X & vbCrLf _ & "Center.Y = " & pArea.Centroid.Y & vbCrLf _ & pArea.LabelPoint.X & vbCrLf _ & "LabelPoint.Y = " & pArea.LabelPoint.Y pArea.QueryCentroid pCenter pArea.QueryLabelPoint pLabel MsgBox "+++Polygon::IArea Queries..." & vbCrLf _ & "Center = " & pCenter.X & "," & pCenter.Y & vbCrLf _ & "Label = " & pLabel.X & "," & pLabel.Y & vbCrLf End If Set pFeature = pEnumFeat.Next Wend End Sub
... View more
12-17-2010
12:31 AM
|
0
|
0
|
572
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-09-2017 07:44 AM | |
| 2 | 01-12-2015 10:36 PM | |
| 1 | 01-15-2015 09:02 AM | |
| 2 | 09-29-2014 02:29 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|