|
POST
|
Hi Aaron, Can you try this in SQL Server: select shape, shape.STX as LONG, shape.STY as LAT from sde.fc
... View more
02-26-2015
10:35 AM
|
2
|
7
|
11454
|
|
POST
|
In the example, I sent it looks like I forgot to paste the new page number. Can you try the following? import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Workspace\DELETEME\TestDDP\dds_test.mxd")
pageNameField = "<FieldName>"
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
mxd.dataDrivenPages.currentPageID = pageNum
pageName = mxd.dataDrivenPages.pageRow.getValue(pageNameField)
print "Exporting page {0} of {1}".format(str(mxd.dataDrivenPages.currentPageID), str(mxd.dataDrivenPages.pageCount))
arcpy.mapping.ExportToPDF(mxd, r"C:\Workspace\DELETEME\TestDDP" + str(pageName) + ".pdf")
del mxd
... View more
02-23-2015
07:14 AM
|
1
|
4
|
3395
|
|
POST
|
In addition, you can use the following to get out the field name and then feed it back into your row.getValue() statement: fieldName = mxd.dataDrivenPages.pageNameField.name
... View more
02-20-2015
05:27 PM
|
0
|
0
|
3395
|
|
POST
|
Hi Ulises, Try out the following to get the page name in your loop. pageName = mxd.dataDrivenPages.pageRow.getValue(pageNameField) import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Workspace\DELETEME\TestDDP\dds_test.mxd")
pageNameField = "<FieldName>"
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
pageName = mxd.dataDrivenPages.pageRow.getValue(pageNameField)
print "Exporting page {0} of {1}".format(str(mxd.dataDrivenPages.currentPageID), str(mxd.dataDrivenPages.pageCount))
arcpy.mapping.ExportToPDF(mxd, r"C:\Workspace\DELETEME\TestDDP" + str(pageName) + ".pdf")
del mxd
... View more
02-20-2015
05:23 PM
|
0
|
7
|
3395
|
|
POST
|
In this case, you would have to make a connection as SPW_GDBA
... View more
02-20-2015
10:47 AM
|
1
|
0
|
797
|
|
POST
|
It would depend on who the owner is. If you look in ArcCatalog, what is the fully qualified name of the feature class/table?
... View more
02-20-2015
10:30 AM
|
0
|
2
|
797
|
|
POST
|
Hi Steve, we would just need to use the account of the data owner. In ArcCatalog, you may see the feature class displayed as "SDE.tblGageData". In this case, "SDE" would be the data owner. To overcome this, the username from the database connection would need to match.
... View more
02-20-2015
09:58 AM
|
1
|
4
|
2145
|
|
POST
|
In your script it appears you are deleting ALL records from the SDE table prior to the insert. Is the goal to remove all the records prior to the insert cursor? If this is such the case, I would not recommend using the Delete Rows command, but rather the Truncate Table command. In SQL, truncate is much more efficient than delete. However, this requires that your table is not registered as versioned.
... View more
02-20-2015
08:58 AM
|
2
|
6
|
2145
|
|
POST
|
Hi Pawel, In the error log it appears the Enable Enterprise Geodatabase tool is attempting to create the sde.version table but failing. Can you confirm that the sde user does not already own this object in the database? If the table does exist, it may point to either a geodatabase previously existing there or the tool only partially completing.
... View more
02-10-2015
06:58 AM
|
0
|
2
|
966
|
|
POST
|
What does your export and import command look like? In addition, from your import log do you see any rows being imported? If you are using the imp commands the row import may look like this: . . importing table "A108" 3728 rows imported If you are using the impdp command the row import may look like this: . . imported "SDE"."A108" 17.80 MB 3728 rows
... View more
02-10-2015
06:52 AM
|
0
|
0
|
2181
|
|
POST
|
Hi David, Here are what those tables are used for: A##: Versioning changes that have been inserted or updated D##: Versioning changes that have been deleted F##: Feature information for SDEBinary or SDELOB feature classes S##: Geometry information for SDEBinary or SDELOB feature classes ArcGIS Help (10.2, 10.2.1, and 10.2.2) -Chris
... View more
01-27-2015
03:50 PM
|
0
|
1
|
1204
|
|
POST
|
There is a good sample on the resource center that will list all the fields, their default value, and any domain assigned. import arcpy
fc = <FeatureClass>
subtypes = arcpy.da.ListSubtypes(fc)
for stcode, stdict in subtypes.iteritems():
print('Code: {0}'.format(stcode))
for stkey in stdict.iterkeys():
if stkey == 'FieldValues':
print('Fields:')
fields = stdict[stkey]
for field, fieldvals in fields.iteritems():
print(' --Field name: {0}'.format(field))
print(' --Field default value: {0}'.format(fieldvals[0]))
if not fieldvals[1] is None:
print(' --Domain name: {0}'.format(fieldvals[1].name))
else:
print('{0}: {1}'.format(stkey, stdict[stkey])) However, if you are only interested in a list of all the domains used within the subtype, we can just list the domains using a similar code: import arcpy
fc = <FeatureClass>
subtypes = arcpy.da.ListSubtypes(fc)
for stcode, stdict in subtypes.iteritems():
print('Code: {0}'.format(stcode))
for stkey in stdict.iterkeys():
if stkey == 'FieldValues':
print('Fields with Domains:')
fields = stdict[stkey]
for field, fieldvals in fields.iteritems():
if not fieldvals[1] is None:
print(' --Field name: {0}'.format(field))
print(' --Domain name: {0}\n'.format(fieldvals[1].name))
else:
print('{0}: {1}'.format(stkey, stdict[stkey])) Output: Code: 1
Default: True
Name: Metal Pipe
SubtypeField: SubTypeCD
Fields:
--Field name: InletWallThickness
--Domain name: fcNumericWallThickness
--Field name: Material
--Domain name: fcMetalMaterial
--Field name: PipeDistributor
--Domain name: fcPipeDistributor
... View more
01-22-2015
07:23 AM
|
3
|
3
|
3996
|
|
POST
|
Currently the only documentation on supportability for OSX is here: What's Coming in ArcGIS | Common Questions Excerpt: "Currently, Esri has no plans to release ArcGIS for Desktop on Mac OS. However, a new application called Explorer for ArcGIS will be released in early Q2, 2014. In its initial release, it will support iOS 7 and be available for download from Apple's App store. In a future release we also plan on bringing this native app to the Android and Mac platforms. The initial release of the app will allow you to discover, use, and share maps in ArcGIS Online and Portal for ArcGIS. A future release will also have authoring capabilities."
... View more
12-11-2014
05:05 PM
|
1
|
0
|
432
|
|
POST
|
To show the output for the Python, can you try and run the the script but at the end, press enter two times to start the script.
... View more
10-20-2014
11:46 AM
|
0
|
0
|
4587
|
|
POST
|
Hi Yoshi, you are on the right track for running the python command in the MXD. If you open the Python window and then paste each line into the python window, you should see the following output. The only change that you would need to make is to set arcpy.mapping.MapDocument() to arcpy.mapping.MapDocument("CURRENT"). This will set the mxd in Python to match the current ArcMap session. The output results should print in the same window you are working in. If you want to run this outside of ArcMap, we can use a program called IDLE which is installed with ArcGIS. 1. To get to it, go to the Start Menu > All Programs > ArcGIS > Python 2.7 > IDLE (Python GUI). This should open a new Python shell window. 2. From this window, click File > New. Paste the entire code into this window. 3. Change the path of the MapDocument to match your MXD. Example: mxd = arcpy.mapping.MapDocument(r"C:\Temp\Python.mxd") *make sure that a lowercase "r" is used before the path 4. Save the Python file 5. Click Run > Run Module 6. All the results will be printed on screen Both of the methods are acceptable for running this script. Just remember that in the script provide, you can delete any of the print statements that you don't want to see on the final output. print "Data Frame: " + d.name print "Layer Name: " + lyr.name print "Data Source: " + lyr.dataSource print "Workspace Path: " + lyr.workspacePath
... View more
10-16-2014
08:04 AM
|
0
|
3
|
4587
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | 10-09-2025 08:31 AM | |
| 12 | 09-27-2022 06:23 AM | |
| 3 | 03-28-2024 05:12 AM | |
| 3 | 12-20-2023 06:42 AM | |
| 6 | 08-31-2023 05:42 PM |
| Online Status |
Offline
|
| Date Last Visited |
15 hours ago
|