|
POST
|
It depends on what your addins do. First of all, make sure you're getting your references correctly. For instance, if you want to do something like add elements to the graphics container then don't get the graphics container reference from something like IMxDocument.ActiveView. The ActiveView property returns a map while in Data view and a page layout while in Layout view. Also, you can simply disable your addin while in the incorrect view. If it only works in Data view then check IMxDocument.ActiveView to see if it is a page layout and disable your addin if it is.
... View more
06-27-2012
05:19 AM
|
0
|
0
|
917
|
|
POST
|
Add a standard .NET toolbar to your form and create buttons for the tools you want. Inside the button click events, get references to the tools you want (via IDocument.CommandBars.Find) and set them to be the current tool (via IApplication.CurrentTool).
... View more
06-27-2012
05:15 AM
|
0
|
0
|
2314
|
|
POST
|
This is more than likely an operating system issue rather than an ArcGIS 10 issue. Typically, users do not have Write privileges on the Program Files folder. Therefore, applications should not write to folders under Program Files. You will need to write to another location, such as the user's profile application data folder or the common application data folder. Older operating systems, such as Windows XP may not have this limitation but you should write your application to be as OS neutral as possible.
... View more
06-26-2012
01:52 PM
|
0
|
0
|
545
|
|
POST
|
The polygons in your shapefile are oriented in the wrong direction. When you create a polygon, exterior rings should be oriented clockwise. A ring that is oriented counter-clockwise is considered a "hole" and will have a negative area.
... View more
06-25-2012
11:15 AM
|
0
|
0
|
1005
|
|
POST
|
Do a spatial query using ISpatialFilter and IFeatureLayer.Search.
... View more
06-14-2012
05:06 AM
|
0
|
0
|
1797
|
|
POST
|
I'm using ArcGIS 9.3.1 and the only Web coordinate system I see is WGS 1984 Major Auxilliary Web Mercator, which is 102113. If you're using ArcGIS 10, then I would verify that the constant you're using is valid by looking it up in the developer help.
... View more
06-13-2012
01:21 PM
|
0
|
0
|
3892
|
|
POST
|
What coordinate system are you trying to create? I tried finding 102100 in the developer help and it doesn't appear to be a valid constant.
... View more
06-13-2012
01:09 PM
|
0
|
0
|
3892
|
|
POST
|
I've never used this method so I don't know for sure but I would guess it would expect the value in the same units used by the feature class that contains the route. You can get this from that feature class' spatial reference.
... View more
06-07-2012
07:41 AM
|
0
|
0
|
1101
|
|
POST
|
The UI that you see when you use a geoprocessing tool is generated from the parameters used by the tool. The tool is simply something that someone wrote to perform a task. The inputs it takes do not necessarily match the parameters required by the underlying ArcObjects methods that it may use. In this case, it is most likely something that was added to make the tool easier for the user to use. You can specify the value in whatever units are available and the tool will do the conversion before passing the value to the ArcObjects method. When calling the ArcObjects method in code, you have to pass in the value in whatever units it expects.
... View more
06-07-2012
05:33 AM
|
0
|
0
|
1101
|
|
POST
|
There are several things that could cause an issue here. Dim pWorkspaceName As ESRI.ArcGIS.Geodatabase.IWorkspaceName
Dim pWorkspaceFactory As ESRI.ArcGIS.Geodatabase.IWorkspaceFactory
'Set up new database
pWorkspaceFactory = New ESRI.ArcGIS.DataSourcesGDB.AccessWorkspaceFactory
pWorkspaceName = pWorkspaceFactory.Create("C:\Temp", "foo.mdb", Nothing, 0) As already mentioned, use the Activator class to create an instance of the workspace factory. Also mentioned, the directory C:\Temp must already exist. Additionally, the database foo.mdb should not already exist. I don't think the Create method will overwrite an existing database. The final parameter to Create is a window handle. Since you're calling this method from a Windows Form, you should be passing in the handle of that form (Form.Handle.ToInt32). In cases where the code is not called from a form, use the application's handle (IApplication.hWnd). You also need to have write permissions on the Temp directory. I can't imagine why you wouldn't but if the code is still failing you might want to make sure.
... View more
06-07-2012
05:21 AM
|
0
|
0
|
2299
|
|
POST
|
You should release the feature objects you're using inside the loop in each loop iteration. The ones I see are fSource, fTargetNew and f (at least it looks like f is a feature object). Call ReleaseComObject on these feature objects inside the loop just as soon as you're done with them just like you do for cursor objects.
... View more
06-06-2012
05:36 AM
|
0
|
0
|
2545
|
|
POST
|
You're calling Refresh on the document's active view. If the document is in Layout view then this will refresh the layout and not the map inside of the map frame. If the document is in Data view then this will refresh the map in the table of contents that is currently active. If you are calling this code while in Data view and the map that contains the layer is active then this should work. Otherwise, you will need to get the appropriate active view reference before calling Refresh.
... View more
06-04-2012
01:43 PM
|
0
|
0
|
1112
|
|
POST
|
I don't work directly with SDE data all that much but if your data is versioned then shouldn't you be specifying the version you want to edit when you open the workspace? Your code appears to be opening the default version: _ps.SetProperty("VERSION", "SDE.DEFAULT");
... View more
05-23-2012
05:18 AM
|
0
|
0
|
1992
|
|
POST
|
just found a workaround: I switch to the dataView and set the center point of the extent there (using the following code), then switch back to the LayoutView: Dim centerPoint As IPoint centerPoint = New ESRI.ArcGIS.Geometry.Point centerPoint.PutCoords((left_x + right_x) / 2, (upper_y + lower_y) / 2) Dim activeView As IActiveView activeView = pMxDoc.ActiveView ' get the active view�??s extent Dim ext As IEnvelope ext = activeView.Extent ' set extent center point: ext.CenterAt(centerPoint) ' set the extent activeView.Extent = ext activeView.Refresh() Cheers, Johannes There's no need to switch to data view in order to run this code. If you change this line: activeView = pMxDoc.ActiveView To this: activeView = pMxDoc.FocusMap then it will work the same in layout view. An active view can be either a map or a page layout. The ActiveView property returns whichever one is appropriate for the current view. If that's not what you want, then you set your active view reference using either the FocusMap or PageLayout properties. Of course, if your layout contains multiple data frames and you want the map inside a data frame that is not the active data frame then you will need to get the frame element from the graphics container and get your map reference from that element.
... View more
05-18-2012
06:25 AM
|
0
|
0
|
1633
|
|
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.
... View more
05-17-2012
07:27 AM
|
0
|
0
|
1548
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-20-2014 05:29 AM | |
| 1 | 02-01-2011 04:18 AM | |
| 1 | 02-04-2011 04:15 AM | |
| 1 | 01-17-2014 03:57 AM | |
| 1 | 10-07-2010 07:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|