|
POST
|
Thanks, I gave than a run and it works. I was hoping to make the code independent of commands but I guess if it is dependent on ArcMap editor extension it doesn't really matter any way.
... View more
02-29-2012
04:09 AM
|
0
|
0
|
1653
|
|
POST
|
I have a requirement to save the edit session after a set number of edit operations. I do the save in the ieditevents2.onstopoperation. It works fine for lines in a file geodatabase but for points in the same geodatabase, it crashes arcmap. It works ok for change or delete point but for create point, it crashes arcmap. No exception, the save is ok, arcmap just crashes after all the code is executed correctly. I created a little sample arcmap extension that saves after every edit: Private m_application As IApplication Private m_editor As IEditor Private m_editEvents As IEditEvents2_Event Public Sub Shutdown() Implements ESRI.ArcGIS.esriSystem.IExtension.Shutdown RemoveHandler m_editEvents.OnStopOperation, AddressOf saveedits m_application = Nothing End Sub Public Sub Startup(ByRef initializationData As Object) Implements ESRI.ArcGIS.esriSystem.IExtension.Startup m_application = CType(initializationData, IApplication) If m_application Is Nothing Then Return m_editor = GetEditorFromArcMap(m_application) m_editEvents = DirectCast(m_editor, IEditEvents2_Event) AddHandler m_editEvents.OnStopOperation, AddressOf saveedits End Sub Private Sub saveedits() Try Dim wk As IWorkspace = m_editor.EditWorkspace m_editor.StopEditing(True) m_editor.StartEditing(wk) Catch ex As Exception Trace.WriteLine(ex) End Try End Sub Any thoughts?
... View more
02-28-2012
08:57 AM
|
0
|
3
|
1824
|
|
POST
|
Sounds like you need multi-versioned views to do this. However, I don't think you can have multi-version views on non-saved edits. Edits in ArcSDE get written to the delta tables. However, in some cases the features may already be deleted, some changed, others created, the changes don't make it to the base tables until a compress. Editing geodatabase data using sql is kind of a gamble, it is fast and works great until it corrupts your entire database. There are ways to make bulk updates faster, (updatecursor, Itablewrite, loadonly) but none of them really come close to using an sql update. If this is a once in a while kind of update, I suggest, closing all edit sessions, reconciling all outstanding versions, compressing the table or featureclass, then running the sql script.
... View more
02-22-2012
11:19 AM
|
0
|
0
|
2702
|
|
POST
|
OS Authentication means that the sql server client is passing along your credentials to the database. For SQL server that works nicely because it can use Microsoft active directory as credentials. Credentials are only half the picture though, that just means, I know who you are and I can be sure of it because you used a domain account authentication to log onto the windows workstation. The other half is authorizing the users in SQL Server to log on and provide them with permissions to see the data. You can authorize only some of the people in you active directory to log onto and read or write data in the database. You can give different permissions to people to different tables etc. So it is possible that you are logged into the workstation using your windows domain account and that account may not be authorized to log onto the SQL server instance.
... View more
02-15-2012
10:43 AM
|
0
|
0
|
2389
|
|
POST
|
Add-ins only don't use registry. ESRIRegAsm still does. ESRIRegAsm does the same things as regasm plus other things like registering the version and the product.
... View more
02-13-2012
10:45 AM
|
0
|
0
|
825
|
|
POST
|
Good point Richard, I would only pass literals across thread. Like an objectid or some string arrays.
... View more
02-13-2012
06:11 AM
|
0
|
0
|
1639
|
|
POST
|
Second that for the IMapDocument. Also use IDatalayer2.Disconnect and IDatalayer2.Connect. This will avoid the program crashing if the layer sources were broken.
Dim dataLay2 As IDataLayer2 = TryCast(m_layer, IDataLayer2)
dataLay2.Disconnect()
Dim newfc As IFeatureClass = fWork.OpenFeatureClass(fcFullName)
Dim ds As IDataset = CType(newfc, IDataset)
dataLay2.DataSourceName = ds.FullName
dataLay2.Connect(CType(fcName, IName))
... View more
02-10-2012
08:24 AM
|
0
|
0
|
1413
|
|
POST
|
Yup I solved the issue. It's a little convoluted and I am sure there are better ways of doing it. I defined my own custom event type in .net I added an event handler on the form for my own custom event I created an ArcObjects extension. I added the ArcObjects event handlers on the extension In the extension event handler, I raise the custom extension That kicks up the event handler on the form. On the form's custom event handler, I changed the properties of the controls using BeginInvoke. BeginInvoke has a different way of pumping the messages through windows that lots of online discussions can explain much better than I can. I am not sure if the custom event was really necessary, I stopped fiddling when I got things to work with the BeginInvoke. I think calling a public method on the form from the event handler in the extension would have worked as long as you used BeginInvoke on the controls in the public method on the form. I didn't test that. In my case I was making a sort of custom identify tool that worked modeless and had to respond to selection changes on the map. I think I might have the code on some external hard drive at home somewhere but I am in the middle of a move... I find this topic very interesting and if other people have done this sort of thing, feel free to chime in, I am curious as to how people have handled this sort of problem. Could make a really nice sample in the advanced topics from programming with ArcObjects.
... View more
02-10-2012
06:25 AM
|
0
|
0
|
1639
|
|
POST
|
I had this problem way back in 9.2 when I tried to put event listeners on a non-modal form. It would work ok for a while then I would get RCW errors. That was a threading problem with a non-modal form but it could have been any kind of threading problem.
... View more
02-10-2012
04:29 AM
|
0
|
0
|
1639
|
|
POST
|
For 9.2, if you check in the install folder for a folder called "dotnet" the interops should be in there. Extension need not be used to be necessary, if you add a reference to them in the project, they are needed to deploy even if they are not used. Also make sure the user running the installer has administrative privileges and has access to the registry. You need full access to the registry to use an installer. Based on the error, it looks like something is tripping up the installer, the installer is trying to report the problem and failing, this failure to report the problem is causing the error.
... View more
02-09-2012
07:03 AM
|
0
|
0
|
2589
|
|
POST
|
My experience with making msi installers is that almost always screwed up a step on my first try and then it was hopeless trying to find the error. I would scrap the set up program and print out the instructions in that link you refer to and go through each step ticking them off. 9 times out of 10 that works for me. Also make sure that all the libraries referenced are on the target machines. Some libraries are only installed with the extensions. Usually the error message warns in the install that you are missing libraries but perhaps not in this case. Also make sure the .net framework was on the machine before installing arcgis or else you will be missing the arcgis .net interop.
... View more
02-09-2012
05:01 AM
|
0
|
0
|
2589
|
|
POST
|
First glance code looks ok, so maybe it is data. Have you tried doing this not in code? In ArcCatalog for example, can you manually make the relationship class you want? If not, then it is something to do with the data, perhaps you will get a better error message. If you can do it, then the problem is in the code.
... View more
02-09-2012
04:26 AM
|
0
|
0
|
647
|
|
POST
|
I assume you upgrade the ArcSDE version from 9.x to 10 around the same time. ArcSDE has two components, the software and the schema in the database. Upgrading usually means installing the new software, then updating the schema. Did you run the update scripts for the database schema to match version 10?
... View more
02-09-2012
04:18 AM
|
0
|
0
|
2337
|
|
POST
|
Looks like you are trying to use the classId of the CreateFeatureDockWinCommand command to find the CreateFeatureDockWin dockable window... These are two separate UI elements. Try using "esriEditor.CreateFeatureDockWin" or "{EA61CE18-4B4F-4767-BA31-A11EC1C63DBB}" (the GUID for that ClassId) Dim dockWinUid As UID = New UID dockWinUid .Value = "{EA61CE18-4B4F-4767-BA31-A11EC1C63DBB}" 'Create Features dockable window Dim pDockableWindowsManager As IDockableWindowManager = TryCast(g_App, IDockableWindowManager) Dim CFWindow As IDockableWindow CFWindow = pDockableWindowsManager.GetDockableWindow(dockWinUid ) If CFWindow Is Nothing Then MsgBox("Nothing found") Else CFWindow.Show(false) End If You can get all the guids from the registry (almost impossible to sort through) or from categories.exe. Categories.exe is in the Desktop10.0\bin directory. In there, turn off hide esri components and go to the appropriate category. In this case ESRI Mx Dockable Windows. Mx is for ArcMap, Gx ArcCatalog, Gx globe, Sx Scene. Then there is Gx Mx which are both ArcCatalog and ArcMap. In this case create feature is ArcMap only so ESRI Mx Dockable Windows. Find the item in there, gives the GUI and string.
... View more
02-08-2012
12:33 PM
|
0
|
0
|
1056
|
|
POST
|
This is a shot in the dark but if you use ITopologicalOperator2 to set isKnownSimple_2 to false and then call simplify on the result geometry of the intersect, do you get an area?
... View more
01-27-2012
03:53 AM
|
0
|
0
|
3651
|
| 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
|