|
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.
... View more
05-17-2012
05:55 AM
|
0
|
0
|
1528
|
|
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.
... View more
05-17-2012
05:12 AM
|
0
|
0
|
1528
|
|
POST
|
If you don't call IFeature.Store then any changes you make to the feature will not be saved.
... View more
05-16-2012
10:10 AM
|
0
|
0
|
1323
|
|
POST
|
I see where you're binding to the Engine product and I see where you create a new instance of AoInitialize but I don't see where you're actually checking out a license. If you haven't checked out a license then your code will fail.
... View more
05-16-2012
05:14 AM
|
0
|
0
|
1813
|
|
POST
|
The ideal way to do this would be to install your gis.dll separately and register it in the GAC. However, this would require that each new version of your dll be installed with policy files to point applications using an older version to the newer version. This isn't hard to do, it just requires more work. You can also install the gis.dll file with each extension and put it in the same directory as your extension's assemblies. If you go this route then you have to make sure that you change the version number on the gis.dll file each and every time you make a change and recompile. If you don't then your extensions will use whichever file is loaded first. When the first extension loads, the .NET runtime loads any dependencies that it needs, which will include your gis.dll. When your other extension loads, the gis.dll that sits alongside the extension assembly will NOT be loaded because it has the same version number as the file previously loaded. The .NET runtime can't tell that the gis.dll is different from the one already loaded because it is only looking at the version number. This is why it is important to change the version numbers. Since you're extensions are not using the correct gis.dll, I'm guessing you didn't increment the version number when you made changes to the dll.
... View more
05-14-2012
05:07 AM
|
0
|
0
|
528
|
|
POST
|
Which versions are you talking about? ESRI's position is that you recompile your application for each version you want to support and my experience is that this is the best way to do it. Backwards compatibility is not supported, so you can't deploy your application to computers with an earlier version of the software (including service packs) unless you recompile against that version. You may be able to deploy to computers with a newer version, but again, recompiling is recommended. You cannot deploy an application compiled against 9.x to a computer with 10.x installed. You will have to recompile as well as follow ESRI's instructions on how to upgrade your application from 9.x to 10.
... View more
04-30-2012
05:16 AM
|
0
|
0
|
767
|
|
POST
|
We still haven't made the switch to ArcGIS 10 yet as we are waiting on clients, but unless things have really changed here's what I see wrong... ' Create a file geodatabase. Dim workspaceName As IWorkspaceName = workspaceFactory.OpenFromFile("G:\PublicWk\geoTagging\pwPhotoDatabaseTest.gdb", 0) This is incorrect. The OpenFromFile method returns an IWorkspace reference, not IWorkspaceName. You should replace your current code with this: Dim workspace As IWorkspace = workspaceFactory.OpenFromFile("G:\PublicWk\geoTagging\pwPhotoDatabaseTest.gdb", 0) This is also incorrect: ptable = workspace.OpenTable("tblGeotaggedPhotos") IWorkspace does not have an OpenTable method. You need to QI to IFeatureWorkspace for that: ptable = DirectCast(workspace, IFeatureWorkspace).OpenTable("tblGeotaggedPhotos") The last thing I see is: row.Value("Latitude") = theGTagInfo.latitude The Value method takes a field index, not a field name. Also, there is no need to set all your variables to Nothing at the end as this will happen by default when the routine exits. If things still don't work after you make these changes then post your updated code and I'll take another look.
... View more
04-26-2012
01:38 PM
|
0
|
0
|
1315
|
|
POST
|
The first thing I would check is your project's Target Platform setting. It needs to be set to x86. By default, it's set to AnyCPU which will cause problems when you try to run your app on a 64-bit system.
... View more
04-26-2012
05:40 AM
|
0
|
0
|
2312
|
|
POST
|
When you call DoModalOpen, the selected item(s) are returned in the IEnumGxObject reference that you pass into the method. However, since you are using the dialog to browse to a Save location then you should be calling DoModalSave instead of DoModalOpen. It's been a while since I've used this dialog for saving things but if I remember right, you have to build the full path by combining the FinalLocation property and the Name property. I could be wrong on that though.
... View more
04-20-2012
05:20 AM
|
0
|
0
|
2003
|
|
POST
|
It's been a while since I've worked with data graphs but I seem to remember that there are some things that are not exposed through ArcObjects. One thing you can try is to create the graph in ArcMap with all of the properties set like you want then and save it out as a template, which you can then load when you create the graph through code.
... View more
04-18-2012
05:15 AM
|
0
|
0
|
463
|
|
POST
|
You should have changed this line: IActiveView activeView = ArcMap.Document.ActiveView; To this: IActiveView activeView = ArcMap.Document.FocusMap As IActiveView;
... View more
04-16-2012
10:59 AM
|
0
|
0
|
1492
|
|
POST
|
The active view of a document can be either the map or the page layout depending on which view the document is in. If you want your tool to only work on the map then get your active view reference from the document's focus map reference instead of its active view reference. IActiveView activeView = ArcMap.Document.ActiveView; Change the line above to get the focus map instead of the active view. When the document is in layout view then your tool will only respond to clicks on the map and will ignore clicks on the layout.
... View more
04-16-2012
10:02 AM
|
0
|
0
|
1492
|
|
POST
|
Is the XP machine 32 bit and are you using Visual Studio .NET? If so, then check your target platform setting in Visual Studio to make sure it's set to x86 for all configurations.
... View more
04-05-2012
01:29 PM
|
0
|
0
|
1647
|
|
POST
|
It sounds like a problem with the geometry itself. When you view its record in the layer's attribute table, does it have a positive area? If the area is negative (or 0) then the polygon is oriented incorrectly. You might also try simplifying the geometry before using it in the query. Dim topoOp As ITopologicalOperator2 = CType(geometry, ITopologicalOperator2) topoOp.IsKnownSimple_2 = False topoOp.Simplify() Another possibility is the polygon and the layer you are querying do not share the same spatial reference. If this is the case you should set the OutputSpatialReference property on the spatial filter using the spatial reference of the polygon.
... View more
04-04-2012
08:27 AM
|
0
|
0
|
992
|
|
POST
|
No, ArcObjects are 32-bit so you'll have to set the target platform of your project to x86. If you do not, then your code will not run as expected.
... View more
04-04-2012
05:45 AM
|
0
|
0
|
521
|
| 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
|