POST
|
Hi Mike, This is a bug and has been logged: NIM084842: Support GlobalID field type with arcpy.da.SearchCursor. You can follow the status of this bug on support.esri.com. Which, nearly 12 months down the track, has no status update. And as for just restricting the field to the GlobalID - that doesn't help. The example given above uses the old cursor (which didn't have this problem), not the new da version. We haven't tried 10.2 yet - can anyone verify this is still a problem? I presume from the (lack of) status update that it is.
... View more
11-04-2013
04:10 PM
|
0
|
0
|
974
|
POST
|
No solution James. I think I'll report it as a bug. FWIW, I have the same problem.
... View more
05-21-2012
11:26 PM
|
0
|
0
|
404
|
POST
|
Stacy (and others), Yes, it's a work computer related issue. I've tried this at home on my personal computer and it has worked perfectly. Now for the difficult bit - trying to get an answer from the work IT people! Thanks again for your help and I'll be following your blog. Mal A follow up: Looks like McAfee is configured to block outgoing connections to port 25 to prevent worms: Anti-virus Standard Protection:Prevent mass mailing worms from sending mail xxx.xxx.xx.xxx:25 Unfortunately for me at least, I think this is a show stopper. The chance of me being able to convince IT to open this up is, to quote local vernacular, Buckley's and none.
... View more
09-12-2011
01:38 PM
|
0
|
0
|
237
|
POST
|
Malcolm, Some googling revealed that your problem may be to do with a firewall -... If you are using a workplace computer it may be that your workplace has some kind of firewall that is blocking your connection to gmail (but if you can access gmail from your workplace, this probably isn't the case)... Stacy (and others), Yes, it's a work computer related issue. I've tried this at home on my personal computer and it has worked perfectly. Now for the difficult bit - trying to get an answer from the work IT people! Thanks again for your help and I'll be following your blog. Mal
... View more
09-10-2011
09:32 PM
|
0
|
0
|
237
|
POST
|
Here is a way you can do it; writes the text file and sends an email. The trickiest bit is getting it to work with your specific SMTP email server. If you have gmail it's easy as pie; if not - google around... ... Let me know how you get on. Thanks Stacey, that's a massive help. I tried with my gmail account, but didn't have success. The error I get is socket.error: [Errno 10061] No connection could be made because the target machine actively refused it I suspect it may be something to do with our firewall blocking a port, although I really don't know. I'm pretty sure the "target machine" is actually ours, not smtp.gmail.com . This is somewhat out of my knowledge base! Google hasn't helped a great deal yet ... Anyone with any suggestions? This really is a great way to report exceptions in batch processing, as everyone gets tired really quickly of checking log files, especially when they're (hopefully) mostly not containing any errors. Mal
... View more
09-08-2011
05:38 PM
|
0
|
0
|
237
|
POST
|
Thank you so much .. that is working perfectly for me! At the risk of complicating things, another option is to get python to send you an email if it fails. Some examples are here . I don't know enough about python to get this working at this stage, but it's certainly something I would like to implement for scheduled tasks. If you do happen to go this way I'll trade you: my idea for your code . 😄
... View more
09-04-2011
10:26 PM
|
0
|
0
|
721
|
POST
|
So this is what I want to do: I have a feature class (A) which I want to copy into another existing, empty feature class (B). Don't ask why; I just do. B has coded domains which define the codes for certain attribute values from A. For example, A has a attribute value of "California" which gets changed to a attribute code of "CA" in B. So when I copy features from A to B, I want to remap the attributes: California -> CA. Seems simple enough. (For those like me who better understand AML and coverages, I would create a relate to a LUT and then calc B.StateCode = A.relate//State - not syntactically correct of course.) I can unload a domain to a table using DomainToTable_management and then create a join from A to that table. Can I then use this as an input field for a FieldMap ? [INDENT] fldMap_IAF_ID = arcpy.FieldMap() fldMap_IAF_ID.addInputField(inLayer, JoinedTable.JoinedField)[/INDENT] From what I've tried it seems not. Or am I going about the the entirely wrong way? Do I have to use an intermediate feature class and, if so, I still have the problem of updating a field in that based on the join.
... View more
08-23-2011
10:26 PM
|
0
|
0
|
681
|
POST
|
I think your problem is with your source layer declaration. (sourceLyr = arcpy.mapping.MapDocument(fullpath)) In this statement, you need to be declaring a map document (mxd) and so that's why when you change the extension to .lyr, it crashes. I'd suggest: mxd = arcpy.mapping.MapDocument(fullpath) sourceLyr = arcpy.mapping.ListLayers(mxd, "name of layer", "data frame")[0] and then carry on with declaring the ID and the new layer, etc. Thanks Erica, but I think you're talking about a layer within an MXD? I was wanting to create a copy of a .LYR files stored on disk.
... View more
07-21-2011
10:36 PM
|
0
|
0
|
254
|
POST
|
From here, the Layer class Provides access to layer properties and methods. It can either reference layers in a map document (.mxd) or layers in a layer (.lyr) file. I am trying to update an existing layer file (.lyr), replacing the data sources and saving to a new file. The code below works fine if the source document is an mxd, but fails catastrophically (kills python) if it is a lyr file. (The lyr file was saved from the mxd.) [INDENT]import arcpy sourceType = ".mxd" # Change this to .lyr and it fails. fullpath = r"D:\WD\InterimGroundwater\Salinity" + sourceType sourceLyr = arcpy.mapping.MapDocument(fullpath) ID = "10014087" newAquiferBoundary = "ID_" + ID + "_AquiferBoundary" newLyr = r"D:\WD\InterimGroundwater\Salinity_" + ID + sourceType lyrList = arcpy.mapping.ListLayers(sourceLyr) for lyr in lyrList: if lyr.supports("DATASOURCE"): if lyr.name == "AquiferBoundary" : print lyr.dataSource lyr.replaceDataSource(r"D:\\WD\\InterimGroundwater\\AHGF_GW_v1-0_master.gdb", "FILEGDB_WORKSPACE", newAquiferBoundary) sourceLyr.saveACopy(newLyr)[/INDENT] Am I doing something wrong or is this a bug? I'm running SP2, Build3200. Thanks.
... View more
07-05-2011
04:31 PM
|
0
|
2
|
410
|
POST
|
Let me clarify the confusion. I need to do some more testing but it appears the previous post is suggesting that the new fix is breaking data paths for layers stored in an MXD when relative paths are turned on. I can't reproduce. I assume you are talking about saving an MXD. I ran mxd.saveACopy on an MXD with relative paths, saved out a 9.3 mxd, renamed the parent folder and could still open the 9.3 mxd without broken paths. Thank you! Jeff Jeff, you are absolutely correct; it has been fixed. I saved to another directory and, of course, the paths didn't follow. Apologies for my mistake and consequential confusion. 😮
... View more
05-12-2011
06:05 PM
|
0
|
0
|
357
|
POST
|
We have confirmed that this is a bug for 10.0 final (and too late to fix for SP1). SaveACopy does appear to work with CURRENT but NOT with stand-alone scripts/script tools. mxd = arcpy.mapping.MapDocument("current") mxd.saveACopy(r"C:\path\someNew.mxd", "9.3") If you are experiencing this issue, please call techincal support and have your name associated with NIM061274. It will help with expediting a fix for the issue. Jeff And from here and here, not important enough to fix in SP2 either? In fact, despite not being mentioned in the Issues addressed with Service Pack 2 document, they have done something (possibly related to fixing NIM064668?). It will actually now save to a V9.3 format, however it destroys the data paths when your MXD is using relative paths. Absolute paths seem to survive. BTW, this bug is different to NIM058666 - ArcPy Layer.saveACopy method fails when saving to the previous version. , which is addressed at SP2.
... View more
05-02-2011
10:43 PM
|
0
|
0
|
357
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|