|
POST
|
Copying a database isn't something I would do while inside an edit session started on that database. Have you tried it outside of the edit session? Also, in VB.NET you can use My.Computer.FileSystem.CopyDirectory to copy the database folder and all of its contents to a new location. Thanks Neil, Yes I tried calling stopediting(true) before the backup also but I still got the same sort of problems. I hesitate to use My.Computer.FileSystem.CopyDirectory because of the exception handling of exceptions on individual files. Also I can't filter out the schema lock files that way. The reason I wanted to use the workspace factory copy was that esri would presumably handle the lock files and future files that don't yet exist in geodatabase.
... View more
08-07-2013
06:03 AM
|
0
|
0
|
633
|
|
POST
|
When versioned data is edited, all the inserts, deletes and update are placed in two tables for the particular feature class, the adds and deletes table (update is a delete of the row and an add of the same row with the new value,) these are the delta tables (delta for changes.) The feature class is made to look like a single table through queries that uses the states table and the state lineage among others. The sde schema has changed in different versions. The point is only when changes are pushed into the default version and the default version is compressed do the changes get moved from the delta to the base tables. Of course once that is done you can use the Oracle or SQL server client to perform regular SQL queries and by-pass arcObjects completely. You can also make multi-version views in the database, which pre-cans the SQL needed to reconcile the versions. Personnally, I have found that if versioning is in the mix, de-normalizing your schema works best. It makes dbas crazy but it makes GIS work easier and it makes ArcGIS perform better. If your work is not GIS-centric, I would consider using un-versioned editing or only versioning the tables that really need to.
... View more
08-07-2013
05:32 AM
|
0
|
0
|
1168
|
|
POST
|
RemoveHandler is being called in the stop editing event.
Public Sub StopEditing(ByVal save As Boolean)
Try
If m_isInSaveEdit = False AndAlso _
m_editor.EditWorkspace.Type = esriWorkspaceType.esriLocalDatabaseWorkspace Then
RemoveHandler m_mapEvents.FeatureClassChanged, AddressOf FeatureClassChanged
RemoveHandler m_actViewEvents.ItemAdded, AddressOf ItemAdded
RemoveHandler m_actViewEvents.ItemDeleted, AddressOf ItemRemoved
RemoveHandler m_IceLineObjectClassEvents.OnChange, AddressOf LineChange
RemoveHandler m_IceLineObjectClassEvents.OnDelete, AddressOf LineChange
RemoveHandler m_IcePointObjectClassEvents.OnChange, AddressOf PointChange
RemoveHandler m_IcePointObjectClassEvents.OnDelete, AddressOf PointChange
RemoveHandler m_AOIObjectClassEvents.OnDelete, AddressOf AOIDelete
RemoveHandler m_AOIObjectClassEvents.OnCreate, AddressOf AOICreate
DisableDockEditorWindows()
End If
Catch ex As Exception
Trace.WriteLine(ex)
End Try
End Sub
... View more
08-07-2013
05:21 AM
|
0
|
0
|
756
|
|
POST
|
as far as sub-queries go: Coverages, shapefiles, and other nongeodatabase file-based data sources do not support subqueries. Subqueries that are performed on versioned ArcSDE feature classes and tables will not return features that are stored in the delta tables. File geodatabases provide the limited support for subqueries explained in this section, while personal and ArcSDE geodatabases provide full support. For information on the full set of subquery capabilities of personal and ArcSDE geodatabases, refer to your DBMS documentation. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000.htm SQL server and Oracle will have their own syntax for complex queries. Inner join is talked about here: http://resources.arcgis.com/en/help/main/10.1/index.html#//018s0000000t000000
... View more
08-06-2013
09:10 AM
|
0
|
0
|
1168
|
|
POST
|
Another fun intermittant problem... I have a system requirement to make a full back-up of a gdb before doing some crunching on it to make sure to be able to back-out if something nasty happens. Turns out the back-up I do is causing something nasty
Dim wkspcFact As IWorkspaceFactory = New FileGDBWorkspaceFactory 'I later changed this use activator (no difference)
Dim copyWsName As IWorkspaceName = Nothing
wkspcFact.Copy(CType(dsWork.FullName, IWorkspaceName), IO.Path.GetDirectoryName(candidateFullPath), copyWsName)
Trace.WriteLine("copy workspace done to " & copyWsName.BrowseName)
Dim copyWkDS As IDataset = DirectCast(DirectCast(copyWsName, IName).Open, IDataset)
If copyWkDS.CanRename() Then
copyWkDS.Rename(IO.Path.GetFileName(candidateFullPath))
Trace.WriteLine("Rename to : " & candidateFullPath)
End If
The code is called from arcmap during an edit session. The problem that some times happens is that the copy goes smoothly and the back-up is fine but all the features in the original are gone. Using featurecount on the featureclasses return the correct count but using gp tools report the feature classes as empty as they appear to be in arcmap. Restarting the edit session still reports the original number of features in the feature classes even if they are empty. If I restart ArcMap, the feature count is zero. ArcCatalog also report a feature count of zero. I replace the above code with this much less elegant code that seems to work better.
Dim SourcePath As String = workspace.PathName
IO.Directory.CreateDirectory(candidateFullPath)
For Each dirPath As String In IO.Directory.GetDirectories(SourcePath, "*", IO.SearchOption.AllDirectories)
IO.Directory.CreateDirectory(dirPath.Replace(SourcePath, candidateFullPath))
Next
For Each newPath As String In IO.Directory.GetFiles(SourcePath, "*.*", IO.SearchOption.AllDirectories)
Try
'if the file has a lock on it, as lock files do, it will fail to copy.
'the prefered workspace copy is causing bigger problems than this.
If String.Compare(IO.Path.GetExtension(newPath), ".lock", True) <> 0 Then
IO.File.Copy(newPath, newPath.Replace(SourcePath, candidateFullPath), True)
End If
Catch ex As Exception
Trace.WriteLine(ex)
Trace.WriteLine(newPath)
End Try
Next
... View more
08-06-2013
07:44 AM
|
0
|
6
|
880
|
|
POST
|
not really. I switched to populating the map with the document focus map on startup of the extension. That works for my application, goodness forbids anyone adds a second map frame to the document... Then it all falls apart. I have the same problem with a task. That is harder to fix because the only hook is the editor that gets passed in. I had to get a reference to my application that has the map set on it. It seems that getting the map from the editor in an event causes problems for setting further event handlers. I really wish these things worked properly. I can't really go to support because the problem is intermittant and part of a customization that has a few 10s of thousands of lines of code and tied to network resources...
... View more
08-06-2013
07:32 AM
|
0
|
0
|
756
|
|
POST
|
I can find anything on NIM059046, any development on this I am also looking to do this.
... View more
07-17-2013
12:15 PM
|
0
|
0
|
708
|
|
POST
|
if you are moving withing the xy domain of the featureclass or dataset (not geodatabase as they may have data in different coordinate systems with different spatial domains) and you are getting this error it could be a bug or it could be your map is in a different coordinate system than your data... What is the XY domain of your featureclass or featuredataset (from the domain tab in the properties) and what are the coodinates you have and where are you trying to move them to?
... View more
06-28-2013
12:05 PM
|
0
|
0
|
1672
|
|
POST
|
What data storage do you have? Are the feature classes high precision? The whole coordinate system boundaries was more relevant in 32bit storage systems. All coordinates are converted from decimal floats to integers internally to integers with a conversion factor. So the maximum precision of your data is a function of the size of the coordinate domain (the bounds of your database.) In the olden days of 32 bits, a coordinate domain of the entire world would only give you hald a meter precision. With high precision feature classes this is no longer a problem, but coordinate systems have the boundaries of the projection system and still have constraints. for example, an unprojected geographic coordinate system (latitude, longitude) still has a -90. 90 and -180, 180 coordinate bounds because, a latitude more that 90 or a longiture less than -180 are impossible. If exporting to shapefiles and reimporting works, there is probably something wrong with your coordinate system or your storage precision.
... View more
06-27-2013
09:19 AM
|
0
|
0
|
1672
|
|
POST
|
There is nothing wrong with your post, it has a lot of valid information, I am just using to forum as a sounding board for things I wouldn't have thought of or things I don't know, like a discussion. I am more interested in ideas than answers. Like I hadn't seriously considered using the table as an event layer, it is a good idea, I am currently experimenting with that in my design phase. I don't have an engine developer license, I only have 20 arcinfos so esri thinks that is not enough to qualify me to develop engine applications so I am developing desktop.
... View more
06-27-2013
06:15 AM
|
0
|
0
|
813
|
|
POST
|
Hmm, If I am going do that, I might as well write my own editor, this is getting very complicated for a simple problem. The problem is I have a featureclass that I want to only allow edit to two or three fields, all attribute fields. Users need to see the shape but I don't want them messing with them. The feature class also contains lat/lon of the shape centroid but that is read only. The name of the shape is read-only too. Only one value is read-write and another which flags a change has a occured, then maybe the date the change occured and the user. Archive featureclass are actually a good candidate for this but I need to restrict the user's edits. I can write a featureclass extension to abort any edit on the other fields but that is not really what I want to do, I want to prevent them from making the change before they even try to do it. What I really want to do is grant permissions per field. The join to standalone was a work-around. The creation of the event layer is a work-around to the work-around... I will try it out though, Maybe if I join the feature class to the table... Means I will have two layers in an opposite join configuration...
... View more
06-27-2013
04:59 AM
|
0
|
0
|
813
|
|
POST
|
I have a standalone table that is version with read-write permission. It is loaded in ArcMap 10.0. I have a featureclass that is non-version and read-only permission. I have a 1-1 join between the featureclass and the table. I want to users to only have edit capability on the attributes in the table. I also want to be able to use the attributes window to set some values. I want to batch set a value on a field for all the user. The users do not want to use the field calculator (too complicated) and do not want to use the table view. Can I use the attributes window to edit one or many rows selected either in the join layer or directly from the table (I can have the select done in code.) Thanks
... View more
06-26-2013
12:06 PM
|
0
|
4
|
1734
|