POST
|
All, Thanks for your help, but I figured out my issue. There is a bug in 10.1 changing versions for table views. Creating a new connection file is the only way to change the version in python. It is fixed in 10.2. Here is a link to the thread talking about the bug: http://forums.arcgis.com/threads/54905-Changing-Versions-with-Python
... View more
12-12-2013
05:54 AM
|
0
|
0
|
1329
|
POST
|
Hmmm, after creating the SDE connection, all of my edits are going to the default feature class and not the version. Do I still have to change versions for each feature class/table?
... View more
12-06-2013
08:12 AM
|
0
|
0
|
1329
|
POST
|
I don't want to edit every version, just the one chosen by a user as a tool parameter. I didn't know about arcpy.CreateArcSDEConnectionFile_management. I can only find references about it for 10.0. If that works in 10.1, that might be the best way to go. Thanks for your help.
... View more
12-06-2013
05:58 AM
|
0
|
0
|
1329
|
POST
|
Thanks, I guess I'm not sure about how to connect to the Transactional version (its not really a path). Is this what you had in mind? out_gdb=r"T:\GIS\tools\SDE_Connection\CO_Stip_User.sde" versions = arcpy.ListVersions(out_gdb) for orig_version in versions: while orig_version == version: minerals=os.path.join(out_gdb,"ilmcostip.ILMCODBO.Minerals") Then whatever edits I make to minerals will only be in that version?
... View more
12-06-2013
05:24 AM
|
0
|
0
|
1329
|
POST
|
Hi all, I need to set up a way to edit a table and a feature class in versions of an SDE database. The version is a parameter in a tool. I must be missing a step, because I am not getting the Change Version function to work for any of my registered tables or the feature class. Not even by converting the table to table view or the feature class to a feature layer. The problem may be with the path. Here is what I think should work: out_gdb=r"T:\GIS\tools\SDE_Connection\CO_Stip_User.sde" abstractTbl=os.path.join(out_gdb,"ilmco.ILMCODBO.Abstract") arcpy.MakeTableView_management (plssTbl, "plss_2") arcpy.ChangeVersion_management("plss_2", "TRANSACTIONAL", version_name) minerals=os.path.join(out_gdb,"ilmco.ILMCODBO.Minerals") arcpy.MakeFeatureLayer_management(minerals,"minerals_2") arcpy.ChangeVersion_management("minerals_2", "TRANSACTIONAL", version_name) The user versions are accessed through CO_Stip_User.sde. The original database name is ilmco. I've tried all sorts of combinations, but nothing is working! Any ideas? Thanks, Sarah
... View more
12-05-2013
02:01 PM
|
0
|
8
|
7139
|
POST
|
Thank you, I used the area and length tokens. Not sure why I thought the getArea function was what I needed.
... View more
09-18-2013
08:11 AM
|
0
|
0
|
185
|
POST
|
I am trying to pull area and length from the SHAPE@ object in an in memory file. When a feature is split into 2 features after the intersect, the area is zero! Any ideas? legal_sr_sec= arcpy.SpatialReference('NAD 1983 UTM Zone 13N') arcpy.env.outputCoordinateSystem = legal_sr_sec arcpy.Intersect_analysis([sections, feature], "in_memory\\sections_join") desc=arcpy.Describe("in_memory\\sections_join") if desc.shapeType == "Polygon": with arcpy.da.UpdateCursor("in_memory\\sections_join",["SHAPE@"]) as uc: for row in uc: geom=row[0] area=geom.getArea() length=geom.getLength() arcpy.AddMessage(area) AtoL_num=float(area/length) if AtoL_num < 1: uc.deleteRow()
... View more
09-17-2013
02:29 PM
|
0
|
2
|
1725
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|