|
POST
|
I am currently converting 9.3.1 tools to 10. I cannot edit the vertices with the edit sketch tool of a sketch created programmatically with a custom task. I create a sketch in my code, set the tool to edit tool, let the user edit the sketch, add, delete and move vertices and do the edit the operation on finish sketch of the custom task. One of the things I have in my application is multi-leader line annotations. The way I implemented it is with a group annotation element and a 1-M composite relationship class with a point featureclass. The points sit at the end points of the line elements that are in the composite element. The relationship class insures the annotation controls the lifetime of the points and will move and rotate them just fine. I have a custom task to create the elements and I already have a command to invoke the task, set the target and the current tool (the users didn't want to deal with all that.) So it turns out that stuff is all working in 10. The problem is with this one edit task I have. I have a tool that selects the annotation feature, activates a custom edit task, takes each leader line of the selected annotation group element and converts them to a multipart polyline sketch and sets the active tool to edit sketch. The user can then edit the sketch with all the edit sketch goodness of the standard tool. When the sketch is finished, the task onFinishSketch alters the group annotation and the related points. The problem is that in 10 the edit tool doesn't allow me to drag-move the sketch vertices. I can add, delete vertices, I can even move the vertices by specify a X Y distance by right clicking and going move but I cannot hover over the vertex and move it with the mouse like in 9.3.1. When I try to invoke the edit vertices tool, I get "Select a single editable feature to modify." I am not trying to edit a feature, I am trying to edit a sketch, I can handle editing the features (1 anno, many points) myself on finish sketch.
... View more
12-30-2010
11:27 AM
|
0
|
0
|
718
|
|
POST
|
You seem to be doing the loop ok. I wonder if so many cast operations is impacting the performance. You may want to keep a set of int32 variables to avoid doing that in the loop. I doubt that will make a huge difference though. I suggest you comment different parts of the loop to see if the problem is looping through the source table, setting the values of the rowbuffer or inserting the row buffer. What your code doesn't show is if the operation is embedded in a edit operation or an edit session or if your target table has a relationship class. These are all things that impact performance. You may also want to look at the ITableWrite2 interface that could speed things up. You might also want to test against a file geodatabase instead of a personal geodatabase. You may also want to compact the geodatabase after doing so many loads. In fact you may benefit from compacting after every few tens of thousands of records too. I also suggest getting a smaller dataset to try more variations without waiting 15 minutes for each test.
... View more
12-29-2010
05:27 AM
|
0
|
0
|
659
|
|
POST
|
A CoClass is a class you can cocreate or instantiate calling the constructor (new.) A class in ArcObjects lingo is a class that cannot be cocreated. An inbound interface is a regular interface where calls executes code inside the class. The call is made from outside the class to execute code inside the class (inbound.) An outbound interface is an event interface, where events are raised by the class and invoke the event listener code outside of the class (code inside the class triggers code outside the class, outbound).
... View more
12-21-2010
08:18 AM
|
0
|
0
|
644
|
|
POST
|
rlwatson is right large address will probably fix the problem. You still have to go through the COM .NET interop even if you are just converting the pixel value directly. In my experience no matter how much memory you have someone will invariably throw some image at it that it just can't handle regardless of interop so chopping up the image into sections the machine can handle is always a good idea. The size that the machine can handle depends on the machine, software version, interop, etc. That is why VBA and C++ will handle larger pixelblocks than .NET. Large address awareness will make a difference too.
... View more
12-21-2010
06:12 AM
|
0
|
0
|
1903
|
|
POST
|
Actually in ArcGIS 9.3.1 because of addressing issues, a realistic limit for the whole process is around 1.5GB. In ArcGIS 10 they have changed the memory allocation and you can get closer to 3GB. Still 32bit though.
... View more
12-20-2010
11:19 AM
|
0
|
0
|
1903
|
|
POST
|
I have had problems with pixelblocks and .Net vs VB 6. The problem is the pixelblock is a COM array that has to be converted to a .net safe array. This takes a lot of memory and is slow. ArcObjects is 32 bits so you will be limited in the amount of memory that can be allocated to the process. ArcObjects is also very memory intensive so it will eat up the memory very fast. Potential solutions include rewriting the pixelblock code in C++, you can make it a library to handle just those functions called from your .net code. Another solution is to limit the size of a pixelblock to something like 100X100 and process the raster in sections. This option will still be slower than C++ due to the COM/.Net interop but should work. The best is a combination of both because even in C++ you can run into memory problems creating very large pixelblocks (the limit will just be higher.) If using .NET I also suggest you release the memory using COMReleaser after processing each pixelblock. Because of the interop calling GC will not clean up the memory.
... View more
12-20-2010
11:10 AM
|
0
|
0
|
1903
|
|
POST
|
There is a ReadMxMaps method that allows you to load up the mxd in memory but not into the mapcontrol. You might want to do that, set the extent of the map or pause the drawing and then load the map to the control by setting the mapcontrol's map property. It also give you a chance to pick the appropriate map if there are multiple dataframes in your mxd.
... View more
12-15-2010
06:42 AM
|
0
|
0
|
682
|
|
POST
|
I have never used visual studio express but in visual studio, under tools, there is an attach to process option. If you start ArcMap, from the start menu, in vs, you can attach to the arcmap process. As long as the dll loaded (in addins folder) is compiled in debug mode and the debug metadata is there (.pdb), you should be able to at least debug the code. It is possible your code is running, failing, not handling the exceptions and it looks like the code didn't run at all. Could also explain why some code runs and some other doesn't.
... View more
12-14-2010
02:00 PM
|
0
|
0
|
1071
|
|
POST
|
ArcMap runs in 32 bit configuration and ArcMap loads the DLL so the DLL should be loaded in 32bit regardless of configuration of the dll itself. Perhaps the problem is somewhere else and this is a false lead. Does the toolbar show up at all in the list of toolbar or does it crash when it opens? Is it an addin or is it registered as a arcmap toolbar? Do you have exception handlers in your toolbar and command constructors and events (such as on create.) It may be an unhandled exception. You may have a different version of ArcGIS on the 32 and 64 bit machines. You may have different account privileges. You may have different extensions installed. I suggest you look at other differences other than the 64 and 32 bit.
... View more
12-09-2010
05:20 AM
|
1
|
0
|
935
|
|
POST
|
If you are editing an SDE database and no one is accessing it at the time. You might consider locking everyone out, connecting as the data owner and putting the featureclass in loadonlymode (IFeatureClassLoad.) That will avoid updating the spatial index and should make it faster. Good Luck
... View more
12-08-2010
05:13 AM
|
0
|
0
|
813
|
|
POST
|
I am not sure why you are creating a new feature and deleting the old one. I would think a more efficient way to do it would be to update the pFeatPoly with the first element of the geometry collection (if the collection contains at least one element) and create new features with other elements of the geometry collection. I prefer to create new features using an insert cursor and a featurebuffer. If you are having difficulties updating or deleting features, I suggest you use a non-recycling cursor. I also suggest you use Ifeaturecursor.deletefeature instead of IFeature.delete. If you use insert cursor, if you flush the cursor I think you will see your changes without having to call save but I would have to test this. Also unless you need undo capabilities I am not sure why you need to frame everything in an operation.
... View more
12-07-2010
05:01 AM
|
0
|
0
|
813
|
|
POST
|
First thing is to make the join using an inmemoryrelationship class. There are some samples on that in the dev help. You should be able to access the joined fields through the IDisplayTable. The IDisplayTable also contains the SelectDisplayTable method which should help you with the joined fields. Good luck
... View more
12-06-2010
05:23 AM
|
0
|
0
|
741
|
|
POST
|
I have dealt with a similar situation in .net (both vb and C#.) The way I dealt with it was to build a list of IFeatureLayers (generic list (of IFeatureLayer). Then bind the list to combobox and set the display property to "Name". This way your combobox doesn't contain a list of featurelayer name strings but a list of actual featurelayer objects. When the user picks one the selecteditem is a feature layer not a string but the featurelayer so there is no need to find the layer by name. Of course showing the user two items in a combo box with the same name is not very nice for the user. But there are other solutions to that (showing the group and name, etc.)
... View more
12-03-2010
04:29 AM
|
0
|
0
|
841
|
|
POST
|
I see two paths here. You change the visible fields in the layer. That means when you view all rows just selected rows, you will see only the fields you are interested in. You might even find the event that switches between all rows and selected rows and apply the change to the tableview then. Another avenue is a TableQueryName or a FeatureQueryName. This is not a selection on your table though. It is creating a a new table in memory based on a query or view (which can contain joined fields from another table) and add it to the map. It would appear as an another table with only the rows and fields you want. There is an example in the dev help under IQueryName2. If you go that route make sure both tables are in the same workspace or else it will be slow.
... View more
12-03-2010
04:12 AM
|
0
|
0
|
741
|
|
POST
|
To my knowledge everything in ArcGIS that is exposed through an API is a COM object. Even the objects in python are com objects underneath. Same for the .NET and Java API (I haven't done much with the C++ API.) Ken's code is good, I like to write it a little different with a using block (you can do the same in C#) and then I handle the exceptions at the highest level possible: Friend Sub DeleteDataset(ByVal InputName As Object)
Using releaser as new ComReleaser
Dim DSDelete As New ESRI.ArcGIS.DataManagementTools.Delete
releaser.ManageLifeTime(DSDelete)
Dim Result As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult
DSDelete.in_data = InputName
Result = RunTool(DSDelete, Nothing)
If Result Is Nothing Then System.Windows.Forms.MessageBox.Show("Unable to delete dataset '" & InputName & "'", "Unable to delete", Windows.Forms.MessageBoxButtons.OK, Windows.Forms.MessageBoxIcon.Exclamation)
End Using
End Sub
... View more
12-01-2010
06:45 AM
|
0
|
0
|
847
|
| 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
|