|
POST
|
A few options, depending on the format you want. >>> from time import strftime
>>> strftime("%m-%d-%Y %H:%M:%S")
'06-13-2013 11:52:00'
>>> strftime("%m-%d-%Y")
'06-13-2013'
>>> strftime("%m%d%y")
'061313'
>>> strftime("%m%d%Y")
'06132013'
>>> strftime("%Y")
'2013'
>>> R_
... View more
06-13-2013
10:52 AM
|
0
|
0
|
7678
|
|
POST
|
I know this is probably not the best place to ask, but hoping/wondering if someone has came across the same issue, and found a solution. I am using ExternalInterface.call("window.open",#,#,#) to open a web page in a new browser window. has been working just fine for some time now in windows XP (still is for the most part), however, we are now getting upgraded to windoze 7, and it is behaving differently. Now, when I click on the feature that involks the ExternalInterface.call, I get three, new windows opening, all with the same URL. anyone found a cause/fix for this yet? Thanks for any help, R_ PS, we are forced to use IE 8, so that is the browser being used.
... View more
06-13-2013
10:44 AM
|
0
|
7
|
1491
|
|
POST
|
John, I realized that you could not just dump the resultant featurelayer 'outNALayer' to a table, however, you say you are successfully writing it to a .lyr file. (arcpy.SaveToLayerFile_management(outNALayer, workspace + "\\" + outLayerFile, "RELATIVE")) a .lyr file can be used in the table to table tool directly. Would think that if the outLayerFile.lyr had the information to add it to ArcMap, that using it directly in the export would give the results that you are after. Could be something to do with the nature of a layer file created for a na composite layer not letting you do it, I'm not sure. Again, I don't have composite layers to examine/test, but curious what "changes" to the layer or outLayerFile.lyr file are made just by adding it to ArcMap? I was under the impression that arcpy can get the same information from the .lyr file that ArcMap can (however, the sub-layer could be and issue here). I was only suggesting, that if ArcMap doesn't actually "change" any data/info when you add it to the map, thought you could skip that part. Would suspect that maybe this is the only way to 'extract' a sublayer from the .lyr, but just thought I'd throw this out there in case (since I can't test). With my .lyr files (again, just basic datasets, not a composite layer), I get the same results if I table to table the .lyr file itself, vs, loading that into arcmap and dumping the table out. R_ Further testing with a "group" layer, and I see that the TableToTable tool has issues and see's it as invalid input...... Thus the need to add to ArcMap..
... View more
06-13-2013
09:25 AM
|
0
|
0
|
421
|
|
POST
|
OK, so you must be running in the python window from within ArcMap if it is finding current layers in the TOC. I have never had a reason to do this, so all my scripting is done stand alone, so not sure if this will make a difference, but you might try:
mxDoc = arcpy.mapping.MapDocument("CURRENT")
and see if that makes a differnce. R_ also, this is Arcpy, so you never know for sure if it is working correctly. If you can't get it to work, you might try arcpy.mapping.UpdateLayer.
... View more
06-13-2013
07:31 AM
|
0
|
0
|
2461
|
|
POST
|
You should be able to find your answer in one of these: http://forums.arcgis.com/threads/38899-Widget-Communication-Explained http://forums.arcgis.com/threads/13863-Communication-between-widgets?highlight=Communicating+widgets R_
... View more
06-12-2013
02:05 PM
|
0
|
0
|
735
|
|
POST
|
Where is it finding the value of Export_Output_21 since this is the layer you are trying to apply the symbology from? ApplySymbologyFromLayer_management (in_layer, in_symbology_layer) I have not used ApplySymbologyFromLayer before, but arcpy.mapping.UpdateLayer(df, updateLayer, sourceLayer, True) is working for me to update my symbology from a .lyr file. R_
... View more
06-12-2013
02:00 PM
|
0
|
0
|
2461
|
|
POST
|
Kelly, The workaround is to upgrade to FV3.3. This version allows you to load the feature layer from a dynamic service. http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Attribute_Table_widget/01m30000004s000000/ http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Attribute_Table_widget_tags/01m30000004t000000/ R_
... View more
06-12-2013
01:49 PM
|
0
|
0
|
1037
|
|
POST
|
Fraser, Thanks for the update. I also have some high resolution imagery that i have turned into a basemap. 3 inch resolution for 580 square miles that have been combined into a FGDB raster dataset that is now 897GB Uncompressed size, but is 327 GB on disk. When you say too inconvienient to cache, not sure if you mean that you don't have the storage for this, or the CPU time to spend on it? I ended up caching my imagery dataset, though it took one of my "lesser" computers 6 days to do it. I cached in the "old" Exploded format, and the total cache is only 84 GB, but what a huge increase in performance. No longer have to load my "good" imagery as dynamic. R_
... View more
06-12-2013
01:42 PM
|
0
|
0
|
309
|
|
POST
|
I don't know what would cause it either, but after your post(s), I did some checking. It appears that I only have to save first if I am logged in under my windoze profile. Any other user does not have the issue. I clobbered and re-created my profile, now it is working for me without the save also. Go figure, R_
... View more
06-12-2013
01:17 PM
|
0
|
0
|
3296
|
|
POST
|
John, Wasn't really thinking about the layer not being available out of ArcMap, as i don't pick the layer from the dropdown, I always click the folder and browse to it. The "layers" in the dropdown are often auto-created views. When browse to the datasource, if it is not a compatible type, it will not be visible to pick from. in this case, that is when I know I have to bring in the FC and make a view first. Now that you have it working as far as saving to a layer file, have you tried the TableToTable on the layer file itself? .lyr files are acceptable input to the TableToTable tool, and I can dump the table to a new one straight from any of my layer files (though, none of them are from a na.solve)
outfile = workspace + "\\" + outLayerFile
newtable = workspace + "\\" + "ODCM_Table"
arcpy.na.Solve(outNALayer)
arcpy.SaveToLayerFile_management(outNALayer, outfile , "RELATIVE")
arcpy.TableToTable_conversion(outfile ,newtable,"#","#","#")
Would think something like this would work without the load of .mapping. R_
... View more
06-12-2013
12:52 PM
|
0
|
0
|
2294
|
|
POST
|
Kerry, As John pointed out, the compact tool will remove "runaway" lock files for you. However, this reminded me of another issue that you could be facing. If someone else has loaded that FC, or any FC from the feature dataset it is in, it will lock the data. HOWEVER, if they do NOT have write access to the FGDB, you will not see a lock file in there. I have been locked out several times by my read-only users, and there is no way to tell if/when they have a lock until you get a permission denied lock error. When this happens, I have to go to my IT guys, and have them look at what user is connected through my network share, and then have them kick them off, or contact the user and have them CLOSE ArcGIS products (Map and Catalog). Can't just remove the FC, need to close the app. In case this applies, R_
... View more
06-12-2013
09:50 AM
|
0
|
0
|
3015
|
|
POST
|
Was wondering if the print statement was just your "test" method. However, was wondering if there was some "trick" that I wasn't aware of. Thanks for the input. Curious as to why my changes don't show until I do a save. Might have to play around with that some more. Are you running in ArcMap 10.1 sp1? R_
... View more
06-12-2013
07:47 AM
|
0
|
0
|
3296
|
|
POST
|
Kerry, That is weird. Normally, when I am having problems with different data sources, I convert to a FGDB item and the problems normally go away. Normally, if I make sure to delete ANY variable that has been assigned to the dataset or to a map document that contains that dataset (or has EVER contained it, even if has been deleted)(for this reason, I no longer "modify" existing mxd's. always start with fresh ArcMap document, and copy/paste datasets if I want a "copy" as this doesn't carry the links/locks to "old", once added datasets) I can delete them fine. Sometimes the overwriteoutput setting works, but others, you must delete it first. It didn't look like it in your example, but perhaps you simplified it for posting, but, if you have any of your FC's or tables loaded from a feature dataset within the FGDB, ALL features within that feature dataset will be locked, not just the items currently loaded. You will have to delete any/all variable references to any of the datasets within that feature dataset before you will be able to delete. R_
... View more
06-12-2013
07:38 AM
|
0
|
0
|
3015
|
|
POST
|
Guess I misunderstood your last post when you said you only wanted one basemap in the Basemaps button, thought you were only dealing with the 2 basemaps, not 4. In any case, you could do the same thing with 4 basemaps, or 40 for that matter as long as you have scale levels to switch with. Now you got me curious. Are your vanilla "listeners" actually adding/removing basemaps from the Basemaps button, or just changing the currently displayed basemap? R_
... View more
06-11-2013
05:18 PM
|
0
|
0
|
2132
|
|
POST
|
import arcpy
arcpy.env.overwrite = True
workspace = r"V:\Projects\Shared\RouteLogSystem\ArcGIS_10_Prototype\Prototype_V10\rtlogptsQAQC\RouteLogPointsQAQC.gdb"
mxd = arcpy.mapping.MapDocument(r"V:\Projects\Shared\RouteLogSystem\ArcGIS_10_Prototype\Prototype_V10\rtlogptsQAQC\RouteLogPoints.mxd")
rtlogpts = arcpy.mapping.ListLayers(mxd, "*rtlogpts")[0] #feature class on SDE
lrs = arcpy.mapping.ListLayers(mxd, "*lrs_route_twn")[0] #feature class on SDE
rdsmall_copy = arcpy.mapping.ListLayers(mxd, "rdsmall_arc")[0] #feature class in workspace
bufferFC = r"V:\Projects\Shared\RouteLogSystem\ArcGIS_10_Prototype\Prototype_V10\rtlogptsQAQC\RouteLogPointsQAQC.gdb\lrs_buffer"
if arcpy.Exists(bufferFC):
arcpy.Delete_management(bufferFC)
#arcpy.Buffer_analysis(lrs.dataSource, bufferFC, "2 Meters", dissolve_option = "ALL")
Any ideas about what is happening? Thanks! Kerry Not sure what is happening, but I get some errors also. however, when modified as I did above, I get no errors and it deletes the FC. R_ I should add, all my testing is in the standalone IDE, not within the ArcMap python window.
... View more
06-11-2013
03:15 PM
|
0
|
0
|
3015
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-14-2026 04:00 PM | |
| 1 | 09-14-2022 07:53 AM | |
| 1 | 09-14-2022 08:23 AM | |
| 1 | 05-21-2026 08:53 AM | |
| 1 | 05-14-2026 04:28 PM |
| Online Status |
Online
|
| Date Last Visited |
Wednesday
|