|
POST
|
Assuming by "conversion factor" you want to move, scale, and rotate the data to match another dataset, you can create a world file that has the same name as the CAD file, in the same directory, with 2 known coordinate pairs representing the CAD x,y and the dataset's corresponding x,y. format is CADx,CADy Targetx,Targety CADx,CADy Targetx,Targety Link to the help on this: World files for CAD datasets—Help | ArcGIS for Desktop Best Regards, Jim
... View more
03-01-2017
07:50 AM
|
0
|
0
|
409
|
|
POST
|
I have restarted my machine and it runs successfully now. I have no idea why it was failing previously, as I can look at the Geoprocessing Results tab, and see the same arguments entered with an unsuccessful result as what I have used for a successful result today. The entry for the string does not need any quotes, as Joshua surmised. ESRI support ran my code as provided with no troubles, I tried it on a different machine with no troubles, and then tried it again on mine with success. No idea what was preventing it before. Thanks to all for your help and input. Best Regards, Jim
... View more
12-01-2016
07:53 AM
|
0
|
0
|
1906
|
|
POST
|
That is a good thought, Joshua. I had tried that as well as using single quotes, double quotes, escaped quotes (/', \', " ' ", ' " ') No joy yet. I have submitted a support ticket to ESRI, and will let you all know what shakes out. Regards, Jim
... View more
12-01-2016
07:12 AM
|
0
|
0
|
1906
|
|
POST
|
That was my original thought as well. I have just tried: SearchStr = arcpy.GetParameterAsText(1) SearchStr = '"{}"'.format(SearchStr) No luck Tried: SearchStr = '"'+str(SearchStr)+'"' No luck The parameter is set to a string type in the dialog. Actually at a bit of a loss for what else to try.
... View more
11-30-2016
09:36 AM
|
0
|
4
|
1906
|
|
POST
|
I don't quite follow. The code runs without issues if I hardcode the SearchStr variable. Lines 20 and 24 turn on the layer prior to export, and then turn it back off before the next event theme is turned on and exported. Line 30 is simply an add message statement so I can see what the code is working with, and line 34 is just an active view refresh. Perhaps the line numbers are skewed? Thanks for your input just the same!
... View more
11-30-2016
08:46 AM
|
0
|
6
|
1906
|
|
POST
|
I have a very simple program to toggle on and off layers and export PNGs. The issue is trying to pass a string to search for in the ListLayers result. If I pass the parameter with the tool dialog, I get no return, even though I AddMessage the string and it shows as expected (see the 4th line under Messages). If I hardcode the string on line 27: for lyr in arcpy.mapping.ListLayers(mxd, "*Events", df): , no troubles. I expect I am missing something basic in the interpolation of the passed string, but I have tried enclosing in additional quotes and using escapes before the quotes, to no avail. Best Regards, Jim import arcpy
Folder = arcpy.GetParameterAsText(0)
Folder = Folder.replace("\\","/")
SearchStr = arcpy.GetParameterAsText(1)
arcpy.AddMessage( SearchStr)
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd,"Layers") [0]
def ExportPNG(sspaText):
# Update the layout text
#for el in arcpy.mapping.ListLayoutElements(mxd,"TEXT_ELEMENT","SSPA_Title"):
# el.text = sspaText
arcpy.AddMessage("Processing " + sspaText)
arcpy.RefreshActiveView()
# Export the Map
arcpy.mapping.ExportToPNG(mxd, Folder + "/" + sspaText + ".png", resolution=600)
def SetVisibility(visNam):
for lyr in arcpy.mapping.ListLayers(mxd,visNam,df):
lyr.visible = 'true'
def SetInvisibility(visNam):
for lyr in arcpy.mapping.ListLayers(mxd, visNam,df):
lyr.visible = 'false'
for lyr in arcpy.mapping.ListLayers(mxd, SearchStr, df):
baseName = lyr.name
arcpy.AddMessage(baseName)
# Call the SetVisibility function to turn on the layer
SetVisibility(baseName)
arcpy.RefreshActiveView()
sspaText = lyr.name[:-7]
ExportPNG(sspaText)
# Call the SetInvisibility function to turn off the layer
SetInvisibility(baseName)
... View more
11-30-2016
07:56 AM
|
0
|
9
|
2698
|
|
POST
|
Are your images the exact same extent? If not, you can not apply your control points from one to the others. If they are the same extents, and do not contain any georeferencing information already, you should be able to apply the same control point file to your images successfully. Best Regards, Jim
... View more
07-18-2016
08:19 AM
|
0
|
0
|
2694
|
|
POST
|
I did not realize you were going to be moving it. Go under the data frame properties for the graticule data frame, and set the extent to "Other Data Frame". They will stay in sync then. Best Regards, Jim
... View more
04-25-2016
02:02 PM
|
0
|
0
|
1517
|
|
POST
|
You could create a second data frame, with the same extents, and put it under the one with your features. Add your grid to this one, and it will appear underneath your features. Best Regards, Jim
... View more
04-25-2016
12:39 PM
|
1
|
2
|
1517
|
|
POST
|
Follow up: The python window shows: Succeeded at Fri Mar 04 10:..... (Elapsed Time 0.06 seconds) but this takes many minutes to pop up. Evidently the process itself is quite fast, but the sequential process is glacially slow.
... View more
03-04-2016
07:25 AM
|
0
|
0
|
423
|
|
POST
|
I have over 200 ascii files, and a .lyr file for the classification I wish to set. I have used the following in the python window, but it is taking HOURS to cycle through. There must be a better way to do this, can anyone point me to a quicker / better solution? >>> import arcpy >>> mxd = arcpy.mapping.MapDocument("CURRENT") >>> df = arcpy.mapping.ListDataFrames(mxd, "*") [0] >>> lyrSource = r"Z:\1393_HANFORD_FY2016\062_FY2016_100_Areas_PT_Rpt\GIS\CrVI_ASC.lyr" >>> for lyr in arcpy.mapping.ListLayers(mxd, "*.asc",df): ... arcpy.ApplySymbologyFromLayer_management(lyr,lyrSource) Best Regards, Jim Cousins
... View more
03-04-2016
06:53 AM
|
0
|
1
|
1964
|
|
POST
|
I have encountered a similar issue, and the labels included leader lines, and annotation stored in the map. I found increased/acceptable performance by converting to annotation stored in a geodatabase. Regards, Jim
... View more
11-25-2015
06:38 AM
|
2
|
0
|
2465
|
|
POST
|
An additional source is the United States Department of Agriculture Farm Service Agency - Aerial Photography Field Office (APFO). They produce orders upon request, so you need to have some additional time built in, and they do charge a minimal fee, but still an often overlooked resource. Regards, Jim
... View more
09-25-2015
07:36 AM
|
0
|
0
|
7642
|
|
POST
|
With a classed post, what is the standard or convention for the breaks? ie: if you have classes 0-10, 10-20, etc. is a value of 10 in the first class or the second? Do you all alter the label to read 0-10, 10.1 to 20? Regards, Jim
... View more
03-31-2015
12:24 PM
|
0
|
1
|
3889
|
|
POST
|
Look into "Data Driven Pages". and "Map Books". Both methods offer some control over map outputs, zoom levels, overlap, etc. Best Regards, Jim
... View more
10-14-2014
07:35 AM
|
0
|
0
|
359
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-17-2013 09:53 AM | |
| 1 | 11-12-2013 05:35 AM | |
| 1 | 06-11-2024 05:53 AM | |
| 1 | 06-07-2024 06:22 AM | |
| 1 | 01-17-2020 05:22 AM |
| Online Status |
Offline
|
| Date Last Visited |
09-25-2025
05:57 AM
|