|
POST
|
That would because I was silly and didn't test it properly. Try this one import arcpy
import os
from arcpy import env
# set variables
path = r'\\gisfile\GISmaps\AtlasMaps\ATLAS_MAPS_17\New folder'
# Write to text file
txtFile = open(path + "{}".format("BrkSrceLst.txt"), "w")
txtFile.write("MXDs that have broken source data" + "\n")
txtFile.write("----------------------------------------------" + "\n")
# iterates through folder and lists broken layers
for fileName in os.listdir(path):
fullPath = os.path.join(path,fileName)
if os.path.isfile(fullPath) and fileName[-3:].lower() == 'mxd':
mxd = arcpy.mapping.MapDocument(fullPath)
txtFile.write("Checking " + fileName + " (" + fullPath + ") \n")
print "Checking " + fileName + " (" + fullPath + ")"
for brknList in arcpy.mapping.ListBrokenDataSources(mxd):
txtFile.write("\t broken layer: " + brknList.name + "\n")
print "\t broken layer: " + brknList.name
# iterates through folder and checks for broken picture element source
for elem in arcpy.mapping.ListLayoutElements(mxd, "PICTURE_ELEMENT", "*logo*"):
txtFile.write("\t broken picture element name: " + elem.name + "\n")
print "\t broken picture element name: " + elem.name
txtFile.write("----" + fileName + " Completed----\n")
txtFile.write("----All MXDs Completed----")
txtFile.close()
print "----All MXDs Completed----" . This is what my output looks like: MXDs that have broken source data ---------------------------------------------- Checking ForPremiseAddress.mxd (C:\WorkDoc\Projects\NG911 Data\ForPremiseAddress.mxd) broken layer: Vector_PremiseAddress broken layer: Addresses_PreviousLoad broken layer: Addresses ----ForPremiseAddress.mxd Completed---- Checking QAQC_VISUAL.mxd (C:\WorkDoc\Projects\NG911 Data\QAQC_VISUAL.mxd) broken layer: VECTOR_PremiseAddress broken layer: 8-26-2016 broken layer: NG911 CENTERLINES broken layer: NG911 CENTERLINES_direction broken layer: ng911_previous_load broken layer: VECTOR_CenPWC broken layer: PWCStreets_RR broken layer: QMCBBND broken layer: VECTOR.ZipPWC broken layer: RegionalPostalCities ----QAQC_VISUAL.mxd Completed---- Checking Untitled.mxd (C:\WorkDoc\Projects\NG911 Data\Untitled.mxd) broken layer: NVRRCL Boundary XY broken layer: Addresses broken layer: VECTOR_PremiseAddress broken layer: Vector_CenPWC broken layer: Roads broken layer: PSAP_Boundary broken layer: msag_prwm_va$ ----Untitled.mxd Completed---- ----All MXDs Completed----
... View more
02-07-2017
06:13 AM
|
2
|
1
|
2907
|
|
POST
|
Try this. This does two things. Formats the output file nicer. Secondly, the broken layer links where never written to the file only the pictures. And those pictures were only written if there was a broken layer. Hopefully it works for you. *note: edited this post to fix a couple typos in code. import arcpy
import os
from arcpy import env
# set variables
path = r'\\gisfile\GISmaps\AtlasMaps\ATLAS_MAPS_17\New folder'
# Write to text file
txtFile = open(path + "{}".format("BrkSrceLst.txt"), "w")
txtFile.write("MXDs that have broken source data" + "\n")
txtFile.write("----------------------------------------------" + "\n")
# iterates through folder and lists broken layers
for fileName in os.listdir(path):
fullPath = os.path.join(path,fileName)
if os.path.isfile(fullPath) and fileName[-3:] == 'mxd':
mxd = arcpy.mapping.MapDocument(fullPath)
txtFile.write("Checking " + filename + " (" + fullPath + ") \n")
print "Checking " + filename + " (" + fullPath + ")"
for brknList in arcpy.mapping.ListBrokenDataSources(mxd):
txtFile.write("\t broken layer: " + brknList.name + "\n")
print "\t broken layer: " + brknList.name
# iterates through folder and checks for broken picture element source
for elem in arcpy.mapping.ListLayoutElements(mxd, "PICTURE_ELEMENT", "*logo*"):
txtFile.write("\t broken picture element name: " + elem.name + "\n")
print "\t broken picture element name: " + elem.name
txtFile.write("----" + filename + " Completed----\n"")
txtFile.write("----All MXDs Completed----")
txtFile.close()
print "----All MXDs Completed----"
... View more
02-06-2017
12:17 PM
|
0
|
3
|
2907
|
|
POST
|
I believe your problem is in line 27 and line 29. Try import arcpy
import os
from arcpy import env
# set variables
path = r'\\gisfile\GISmaps\AtlasMaps\ATLAS_MAPS_17\New folder'
# Write to text file
txtFile = open(path + "{}".format("BrkSrceLst.txt"), "w")
txtFile.write("MXDs that have broken source data" + "\n")
txtFile.write("----------------------------------------------" + "\n")
# iterates through folder and lists broken layers
for fileName in os.listdir(path):
fullPath = os.path.join(path,fileName)
if os.path.isfile(fullPath):
basename,extension = os.path.splitext(fullPath)
if extension == ".mxd":
mxd = arcpy.mapping.MapDocument(fullPath)
print "current MXD being checked is: " + fileName
for brknList in arcpy.mapping.ListBrokenDataSources(mxd):
print "\t broken layer: " + brknList.name
# iterates through folder and checks for broken picture element source
for elem in arcpy.mapping.ListLayoutElements(mxd, "PICTURE_ELEMENT", "*logo*"):
print "\t broken picture element name: " + elem.name
txtFile.write(fullPath)
txtFile .write(elem.name)
txtFile.close()
print "\t completed"
... View more
02-06-2017
10:22 AM
|
1
|
6
|
2907
|
|
POST
|
I had a similar problem in Oracle the other day. It was related to using a function that returned value with an input value that was too long (too many string characters) for the function. So with that, I wonder if your ST_GEOMETRY might be not have z values. If you view the query's results in pgAdmin what values are being returned from ST_Z(Shape)?
... View more
02-03-2017
06:40 AM
|
0
|
0
|
893
|
|
POST
|
Thanks that was the problem. I had CENPWC at SRID 5, CENQMBC_OLD at 2283. When I used the project tool from ArcGIS Desktop toolbox on CENQMBC_OLD it set the SRID for it 113 even though I imported the CENPWC coordinate system. I finally can to copy both of them down to a FGDB but them in a dataset then copy them back into SDE. This gave them both SRID 5 and the view works just fine now.
... View more
02-02-2017
06:59 AM
|
1
|
0
|
1709
|
|
POST
|
Hi all, I am having a problem with a view I created in our database. Background: We have a section of county that is on a military base. They maintain their own roads but we have a agreement that we can assist with EMS services as needed. A few years ago, they re-addressed their roads but allow residents to use either the new or the old address. For our 911 system we need to create a feature class that shows all roads and with duplicated records for roads with old names. All other applications do not need the old names so we do not want to include in our normal road centerline feature class. So we have our normal road centerline (CENPWC) feature class and a separate feature class for the old names (CENQMCB_old). I want to union (via a view) them together so that I have single view with both sets of roads. Both feature classes are versioned. Environment: Oracle 11g with SDE 10.3.1 Code: CREATE OR REPLACE VIEW CENPWC_NG911_VIEW AS SELECT cenpwc_evw.globalid, cenpwc_evw.shape FROM cenpwc_evw UNION ALL SELECT cenqmcb_old_evw.globalid, cenqmcb_old_evw.shape FROM cenqmcb_old_evw *Note, I will add the other attributes in later after I get it to work in ArcMap. Error: When I bring it into ArcMap, and open the attribute table it reads about half the records then I get the following error: "Error reading OID from table. Reading rows has been stopped. Check that the datasource is valid. The given coordinate references are incompatible The operation is not supported by this implementation." Both feature classes have the same coordinate system and extents. The view works fine when I view it in Oracle's SQL Developer. What am I missing? Thanks.
... View more
01-31-2017
01:29 PM
|
0
|
2
|
2326
|
|
POST
|
I use Chrome too and don't have that problem. Are you using the 6 digit hex code? That is the only thing I can think of.
... View more
12-09-2016
06:09 AM
|
0
|
1
|
2160
|
|
POST
|
You can change this color under the Theme section of the site editor. It is the Brand Primary Color setting.
... View more
12-06-2016
07:13 AM
|
0
|
7
|
2160
|
|
POST
|
Hi all, Does anyone know know how to modify the banner layout element in the Open Data? I see where I can change the colors, text, and add a search bar but that is the only options. I would like to know if it is possible to change: 1. Font size and type on headline 2. Search Bar width 3. Spacing between the headline, search bar, and top/bottom margins. If it isn't possible to do this in the banner element, what is the html code to add search bar to the text element. Thanks, Kevin Dunlop Prince William County Gov't
... View more
12-02-2016
08:58 AM
|
3
|
3
|
1918
|
|
POST
|
Hi Courtney, We had to change several of services which caused many phantom items. Can you remove: http://gisbeta.pwcgov.opendata.arcgis.com/datasets/13caaf8f329340f181c29044933173dd_6 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/1c71e4d6a7bf4db3b1dbccfd718dfcc4_1 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/262e7db2b3b44d44b7d22b509fd3495a_4 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/26e0c74d4fe845d7a5871c0747e6e74f_7 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/373c4b56843b46999a3cfdbfb96e546b_6 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/37afe6ccfdd84a61b1664dd6b53ba1ba_9 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/3f68fbc57b254a02b64f764ef382c627_0 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/409de103e95a4416a2fc984b7fef1b6a_5 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/437102c5c39848748bc88178d12a8186_2 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/529bd00516ea44fea2fc972304e02b42_0 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/589b7dd672d546d885d758863ee3beca_10 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/6339aa3ce01e4d249bd611917f86c0e7_2 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/6889ccda4a3447beaceadf8cb553f287_3 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/78fb6401d2d642dca948fe76f57aa590_3 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/7d0098c603bc407699f358a19e078571_10 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/8bedc966e5664949bb63ffe80cea7b30_1 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/8bedc966e5664949bb63ffe80cea7b30_17 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/972ebe3afc2d494bb7e5ad165dc643a6_5 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/97a9e95e439f465fbd8f980df3c94023_2 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/9991417de79143aba7d11a67de4247f8_4 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/ac728540b9454a2980873d9e478e0363_9 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/c392775c561842d796c248c350c14835_5 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/cc2376aa1b454b469386b7f355577e87_0 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/cde2c92964b44349b21a0682da5bcf2e_1 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/d0944abd75b2494f9f8321a2bf0fa43b_3 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/d77846fb52634227b77385c2a47f7a5a_7 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/e50871e73a304709a0c33019d25835d0_5 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/e53941719add435bbd1a36712f331841_2 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/e53941719add435bbd1a36712f331841_3 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/e9f0d72fe33e4ea6850cb10af07ca47f_13 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/f9e08998523d44e3bfebcf439e250fc8_12 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/f9ead7671f174ffea188914c6fba8e50_2 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/fc90fa6cf52f44c09084e82ee50acc8d_6 In addition, I have two records with the same URL and attributes. I am not sure how that happened. http://gisbeta.pwcgov.opendata.arcgis.com/datasets/db9f8761dad340c799112d37b56024de_11
... View more
11-30-2016
08:21 AM
|
0
|
0
|
1841
|
|
POST
|
Hi Courtney, The site is private since we are still building it but here are the URL. http://gisbeta.pwcgov.opendata.arcgis.com/datasets/1e8289568fd94be1a870c9e8208b5741_2 http://gisbeta.pwcgov.opendata.arcgis.com/datasets/6889ccda4a3447beaceadf8cb553f287_4 Please let me know if you need any additional information. Kevin
... View more
11-18-2016
09:02 AM
|
0
|
1
|
1841
|
|
POST
|
I am having an issue with Phantom items in the Open Data Beta. Basically, it will create two records for the same item, one gets update and the other does not. It happens when changing ownership and index number. I am able to reproduce this problem by following steps: 1. Create an Feature Layer in AGOL under first user (ex myUser). I used URL of https://myOrg.com/arcgis/rest/services/myFolder/mySerice/MapServer/13 for example 2. Assign Feature Layer to a group(s). 3. Change ownership to a different user (ex myOrg) 4. In a new browser tab, update index in Open Data data manager 5. In previous AGOL tab, change layer index in URL. Example change 13 to 7 so that it is now https://myOrg.com/arcgis/rest/services/myFolder/mySerice/MapServer/7 6. In previous Open Data tab, update index in Open Data data manager You show now have two records for the same layer but with different users each. You can test this by deleting feature layer. One of the records will disappear and the other will remain. In addition, the remaining layer points to a broken URL. I have been unable to remove these phantom item records no matter what I try. Here is some screen shots on an example (Railroad). Does anyone know how to remove these phantom items? Thanks, Kevin Dunlop GIS Database Developer Prince William County.
... View more
11-18-2016
07:10 AM
|
1
|
16
|
6844
|
|
POST
|
Hi, I was wondering if there was a way to widen the search bar in Open Data Beta site? The bar is very narrow and I can't seem to find an option to make it wider. It also seems to take up a lot of white space. In fact most things, the beta site takes up a lot of white space. Kevin Dunlop Prince William County, VA
... View more
11-10-2016
07:28 AM
|
1
|
0
|
766
|
|
POST
|
This is not an ideal way but you could create a python script that makes a FGDB each night and copies all feature class, datasets, and tables to it. Once they are in the FGDB you can copy them into other database. You could always go directly from the SDE and to SDE via the script and skip the FGDB if your system permits that. Then use windows task scheduler to automatically run the script at a certain time (ex: 2 am). Problem with this method is that you are making a copy so you have to transfer everything not just the stuff that changed. In addition, you will need to delete the stuff at the destination before copying to prevent errors and duplication. In addition, you will have to copy every version you have if you are using versioning and they won't be linked properly in the destination.
... View more
05-25-2016
01:38 PM
|
0
|
0
|
3158
|
|
POST
|
Try: ArcToolBox > Data Management Tools > Features > Split Line at Point
... View more
10-30-2012
11:31 AM
|
0
|
0
|
371
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-19-2018 06:01 AM | |
| 2 | 10-15-2024 06:24 AM | |
| 1 | 10-09-2012 03:56 AM | |
| 1 | 07-28-2022 12:52 PM | |
| 2 | 09-21-2022 11:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-18-2024
02:22 PM
|