|
POST
|
Assigning a GUID to each feature would require you to change the database schema, which you said you can't do. Since that's not an option you'll have to figure it out based on the situation you're in. To get back to the feature, you would need to store information about the database it comes from along with which feature class it belongs to and the OID of that feature within the feature class. The OIDs are unique within the feature class and the feature class is unique within the database. The problem is that database names are not unique. You could have any number of personal geodatabases on a machine all with the same name just located in different directories. The path to each would be unique, but only on that machine. So, if it's possible to have databases on different machines with the same name then you would also need to store the machine name. Maybe your environment is simple enough that you don't need to worry about all possibilities and only storing the database name is sufficient. Perhaps you're only concerned with features from layers in a specific map document. You might then only need to store the layer name from the document (and perhaps the document name) and the feature OID. This, of course, assumes layer names will be unique within the document. As you can see, every answer includes "it depends". This isn't something that anyone can really help you with as you're the only one who knows the environment you're working in.
... View more
03-14-2014
07:39 AM
|
0
|
0
|
653
|
|
POST
|
What's the purpose of this identifier? If you just want the feature to have a unique id then assign it a GUID. If you need to somehow be able to go back and find the feature using only this identifier then you need to come up with a convention for building the id that gives you all the information you need to locate the database, feature class and feature.
... View more
03-14-2014
05:07 AM
|
0
|
0
|
653
|
|
POST
|
As the message states you should consider changing the Embed Interop Types property on your assembly references. By default, it's True. Changing it to False will cause the warning to go away. I would recommend you do this. This property is new with the 4.0 .NET Framework. Switching your project to use the 3.5 .NET Framework will also make the warning go away.
... View more
03-12-2014
05:03 AM
|
0
|
0
|
533
|
|
POST
|
I don't see anywhere in the code you posted where you are creating a feature class, or a feature for that matter. Your code is drawing a point on the display. Unless you put this code in the active view's AfterDraw event, it will simply draw once and then disappear on the next refresh of the display because it's simply a graphic and is not permanent. If you want to create a new feature from the point and save it into a feature class then that is completely different than what you are doing in the code you posted. There are examples that show how to create new features in the developer samples and here on the forums.
... View more
03-06-2014
05:07 AM
|
0
|
0
|
736
|
|
POST
|
Are you calling IMxDocument.UpdateContents after changing the layer name?
... View more
03-05-2014
04:24 AM
|
0
|
0
|
931
|
|
POST
|
Where is the feature class in use? If it's in your map document then you probably need to disconnect the layer from its data source (IDataLayer2.Disconnect) and delete it from the map.
... View more
02-26-2014
04:15 AM
|
0
|
0
|
1551
|
|
POST
|
Use IDataset.Delete. I would imagine you can't delete feature datasets unless they are empty though.
... View more
02-25-2014
05:18 AM
|
0
|
0
|
1551
|
|
POST
|
You can only bind to a single product. All Engine components will run using a Desktop license, but not all desktop components will run using an Engine license. If your application uses Desktop components, then you should be binding to the Desktop product. Likewise,you should be checking out a Desktop license (this is separate from binding). If you are doing this and still getting an error then that error is likely being caused by something else.
... View more
02-24-2014
05:24 AM
|
0
|
0
|
271
|
|
POST
|
Looks like an Engine specific issue. I changed my binding to "Desktop" and it works. The IObjectLoader interface is only available in ArcGIS Desktop. It is not available in Engine.
... View more
02-18-2014
10:47 AM
|
0
|
0
|
749
|
|
POST
|
See the functions below: Public Const Guid_SpatialAnalyst As String = "{3C5059FE-9F15-401A-94ED-EED914D73E3E}" Public Shared Function IsSpatialAnalystAvailable(ByVal application As IApplication) As Boolean
Dim uid As New UID
uid.Value = Guid_SpatialAnalyst
Dim extension As IExtension = application.FindExtensionByCLSID(uid)
Dim extensionConfig As IExtensionConfig = DirectCast(extension, IExtensionConfig)
Return (extensionConfig.State <> esriExtensionState.esriESUnavailable)
End Function
Public Shared Function IsSpatialAnalystEnabled(ByVal application As IApplication) As Boolean
Dim uid As New UID
uid.Value = Guid_SpatialAnalyst
Dim extension As IExtension = application.FindExtensionByCLSID(uid)
Dim extensionConfig As IExtensionConfig = DirectCast(extension, IExtensionConfig)
Return (extensionConfig.State = esriExtensionState.esriESEnabled)
End Function
Public Shared Function EnableSpatialAnalyst(ByVal application As IApplication) As Boolean
Dim uid As New UID
uid.Value = Guid_SpatialAnalyst
Dim extension As IExtension = application.FindExtensionByCLSID(uid)
Dim extensionConfig As IExtensionConfig = DirectCast(extension, IExtensionConfig)
If extensionConfig.State = esriExtensionState.esriESUnavailable Then Return False
If extensionConfig.State = esriExtensionState.esriESEnabled Then Return True
extensionConfig.State = esriExtensionState.esriESEnabled
Return True
End Function
Public Shared Function DisableSpatialAnalyst(ByVal application As IApplication) As Boolean
Dim uid As New UID
uid.Value = Guid_SpatialAnalyst
Dim extension As IExtension = application.FindExtensionByCLSID(uid)
Dim extensionConfig As IExtensionConfig = DirectCast(extension, IExtensionConfig)
If extensionConfig.State = esriExtensionState.esriESUnavailable Then Return False
If extensionConfig.State = esriExtensionState.esriESDisabled Then Return True
extensionConfig.State = esriExtensionState.esriESDisabled
Return True
End Function
... View more
02-13-2014
04:57 AM
|
0
|
0
|
525
|
|
POST
|
A null feature class means the data link is broken. Make sure the mxd can access its data.
... View more
02-11-2014
04:55 AM
|
0
|
0
|
491
|
|
POST
|
Using IFeature.Store is the slowest way to save changes to a gdb if you're making large numbers of edits. Instead, use IFeatureclass.Update to get an update cursor and call IFeatureCursor.UpdateFeature where you would normally call Store. For creating new features, use IFeatureClass.Insert to get the cursor and IFeatureCursor.InsertFeature. Also, before you start, place the feature classes you're writing to into LoadOnly mode using IFeatureClassLoad. Take them out of LoadOnly mode when you're done.
... View more
02-11-2014
04:52 AM
|
0
|
0
|
1034
|
|
POST
|
You're mixing events - ElementAdded and ElementsAdded are two separate events.
... View more
02-10-2014
04:39 AM
|
0
|
0
|
324
|
|
POST
|
It's been a while since I've had to work with joins on a layer but I believe you can access them through IRelationshipClassCollection, which is an interface implemented by the layer object.
... View more
02-07-2014
05:34 AM
|
0
|
0
|
473
|
|
POST
|
One of the best ways to find out how to call any of the geoprocessing tools is to run them through the ArcGIS software. The geoprocessing window for the tool will show the command line arguments as part of the output log.
... View more
02-07-2014
04:08 AM
|
0
|
0
|
288
|
| 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
|