|
POST
|
Did you do the run time binding to desktop? http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_migrate_ArcGIS_9_3_Desktop_and_Engine_stand_alone_applications_to_ArcGIS_10/0001000002ns000000/
... View more
04-14-2011
05:36 AM
|
0
|
0
|
1614
|
|
POST
|
The example you reference is for a ClassExtension. The command just registers the class extension to the featureclass. From that point on, the feature class has a reference to the an extension id (guid, I think) in the database. So when the featureclass is edited or identified or whatever, Arcmap checks if the featureclass is registered as having a class extension, then looks in the windows registry for where the code for that extension is and loads it. You cannot instantiate the code your self, that is done by arcmap/arcobjects for you. The class extension init method passes a reference to the featureclass. You wouldn't want to use a reference to the application directly in a class extension since, in some cases there might not be one. It is possible to write a console exe that uses arcobjects and edits or does something to a featureclass that has a class extension that will get instantiated at run time by arcobjects. Class extension are a little tricky to work with, I suggest you read this part in the help. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Creating_class_extensions/000100000201000000/
... View more
04-12-2011
01:52 PM
|
0
|
0
|
903
|
|
POST
|
The hook is meant to support different types of application for the same code. When you develop with ArcGIS desktop, you register your components (ESRIRegAsm.) That places a reference to the component you developed in the registry in a category. There are many categories, some apply only to arcmap, others apply to ArcMap, Globe, Catalog, Engine, etc. When any of these applications start up, they read the registry to see which components apply to it. At various other times components are read from the registry and created. For a command or and extension, that is when the oncreate will be called by the ArcMap application. In your development, you need to be able to get a reference to the ArcMap application or to the map, this is what the hook is for, it allows you to get a handle or hook into the application that created the component. A command for example could be registered to work in any ArcGIS application. In that case, when the ICommand.OnCreate is invoked, any of these applications or hooks could be passed into to the command. You need to be able to handle the different possibilities, the hookhelper is a generic way to handle any type of application, it applies to all of them.
... View more
04-12-2011
07:31 AM
|
0
|
0
|
903
|
|
POST
|
Hi, I am trying to extract the portion of a raster image that is not null into a polygon geometry in ArcObjects. The reason is I need the outline of the image without all the null values around the edges. I have something that works so far but it is very slow. I use the ILogicalOp.IsNull, save the output to disk, then use the IRasterConverterHelper.ToShapfile and select the gridcode=0 polygon. It works ok it is just very slow and creates intermediate data on disk that I don't care for and that I need to clean up. does anyone know if you can extract the polygon directly from the raster? Thamks.
... View more
04-11-2011
11:43 AM
|
0
|
0
|
893
|
|
POST
|
I have had this problem too. If I select bind to desktop (not engine or desktop), it works. In my case I only need to bind to desktop. Binding to EngineOrDesktop causes as problem if the target machine has Engine installed but not licensed. I found that if I did not have engine installed at all, it would bind to desktop and work ok. You could verify what is installed before you bind. I also had problems using engine mapcontrols with arcgis desktop if I had the preview in development environment option on (not sure why.)
... View more
04-11-2011
11:17 AM
|
0
|
0
|
1614
|
|
POST
|
I have been struggling with this for a few months. I used the machine of one of our licensed developers for testing purposes. It turns out if your mapcontrol is set with preview in design mode, when you deploy it in arcmap on a non-developer machine, it requests an engine developer license on the deployment machine. If you turn off preview in design mode, you can compile and deploy it ok!
... View more
04-08-2011
11:54 AM
|
0
|
0
|
1320
|
|
POST
|
Further developments, I discovered that having Joins with the option keep only matching records (inner join) in a an open arcmap session puts the "rd.lock" on the tables and featureclasses involved in the join. I am not sure why but they put an edit lock on the tables and featureclasses. Regular left joins are ok.
... View more
04-01-2011
10:05 AM
|
0
|
0
|
3568
|
|
POST
|
Hi, I am currently debugging a problem with locks on a file geodatabase for some functions that were done programmatically. I notice there are ".sr" locks, which are schema locks, i.e. not change to the schema allowed. There are ".ed" locks, edit locks, no edits on the data allowed. There is another lock file, ".rd" lock, this one I am puzzled with. Does anyone know what rd locks are? The only mention it would be some unreleased cursor. Still I would like to know if it puts an edit lock on the featureclass.
... View more
03-31-2011
11:03 AM
|
0
|
12
|
10180
|
|
POST
|
a MapClass is just a Map. Add Class at the end of the class names is a .net thing, I forget why we do that now. It avoids conflicts with types from other assemblies. In java I think it is just a "map" same thing... http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriCarto/Map.htm
... View more
03-25-2011
09:49 AM
|
0
|
0
|
429
|
|
POST
|
If you are listening to OnDeleteFeature from the ArcMap editor extension, you should not abort the operation. OnCreate, OnChange, OnDelete all happen inside an edit operation. You should never try to stop or abort an operation from inside the listener. If you need to void the operation, throw an exception with a message you want the user the see. The exception will be caught in esri code and the esri code will abort the operation and show the user the message. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/000100000340000000.htm "Do not call AbortOperation inside any editor event, including BeforeStopOperation."
... View more
03-24-2011
09:13 AM
|
0
|
0
|
789
|
|
POST
|
Ok, I don't think IRasterAnalysisEnvironment is going to be much help. The activeview will be a map as long as you are not in page layout view so that might not always work. The IMxDocument.FocusMap will always be a map. Next is to get the layer that is the raster from the map, in avenue that is called a theme. The layer returned should be a IRasterLayer. The IRasterLayer has a raster property that returns an IRaster, that used to be a grid. A raster class has many properties that allow you to get the cell size, the value at a point, a pixelblock (neighbourhood.) http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/RasterClass_Class/001q00000430000000/
... View more
03-17-2011
08:41 AM
|
0
|
0
|
1200
|
|
POST
|
All the libraries have changed between Avenue and ArcObjects, it is a complete re-write. You best bet is probably to figure out what the Avenue code does, write pseudo-code and rewrite it with ArcObjects. Avenue is a proprietary esri language that works with ArcView GIS 3.x. VBA is a microsoft language which esri provides to work with the ArcGIS programming API called ArcObjects. So the language has changed and also the application you program against. There used to be a course on migrating avenue to vba. I haven't seen it for years but you might be able to get your hands on some of the course documents. You should also note that VBA is planned to be deprecated in the near future too so you might be converting all your programs to something that will be need reconverting soon.
... View more
03-16-2011
05:34 AM
|
0
|
0
|
1200
|
|
POST
|
The imap.layers method has a recursive boolean argument as the second argument. That looks into composite layers.
... View more
03-15-2011
09:29 AM
|
0
|
0
|
1502
|
|
POST
|
Hi A few things I noticed. You probably should use a non-recycling cursor for updating. I am not sure why you are trying to delete a feature and create a new one with the exact same shape. You can update the features geometry directly with an update cursor through the shape property. If the code you provided worked, the only thing I could see it doing is changing all the objectids and setting any attributes to default, the shapes will be the same. If that is what you want to do, I would advise to let ArcObjects handle the ObjectId, and you can change the attributes of the feature with an update cursor without deleting and creating the features. If you truly want to set a feature's shape to another feature, I would suggest using shapecopy. I would also recommend you add the cursor to the comreleaser (managelifetime)
... View more
03-09-2011
04:54 AM
|
0
|
0
|
479
|
|
POST
|
Looking at the original code posted, I noticed you have a try/catch block inside the operation. That is fine but when you catch an exception you should stop or abort the edit operation, if you don't you will leave a dangling edit operation which could result in a error the next time through.
... View more
03-04-2011
12:12 PM
|
0
|
0
|
2226
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-02-2024 10:26 AM | |
| 1 | 07-05-2024 08:45 AM | |
| 1 | 10-05-2022 02:19 PM | |
| 6 | 03-27-2017 01:16 PM | |
| 1 | 05-05-2016 05:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-28-2025
07:37 AM
|