|
POST
|
Chris, thanks for the reply. Unfortunately this is all happening on the same computer I have been using for a few years now. I am viewing the PDF on the same machine that has the ArcGIS 10.3 installation. I did not have this problem a few weeks ago. The point symbols in question are an ESRI circle 2 symbol and not based on a proprietary font. I have not (I cannot) install fonts due to restrictions imposed by my employer. My IT help department has tried rebuilding my Citrix profile and reinstalling the PDF driver to no avail.
... View more
11-10-2015
04:06 PM
|
0
|
2
|
2509
|
|
POST
|
David, thanks for the reply. I do have Embed fonts and Convert Marker Symbols enabled.
... View more
11-10-2015
03:57 PM
|
0
|
0
|
2509
|
|
POST
|
I have recently started having troubles exporting to PDF where certain colored circle marker symbols appear as black dots. I have read the information posted here: 17783 - Diagnose an ArcMap printing or exporting problem but get the following results when publishing as EMF. If I export to EMF and view the resulting file in MS Paint the symbols appear as they do in ArcMap. If I export to PDF from ArcMap 10.3 I get some colored dots appearing as black dots and others appearing as they should. If I add the EMF file to an MS Word document all the dots appear as crescents. Why is this happening and what can I do to fix the issue? FYI, I do not have (or want) ArcGIS Pro. Above is the original from ArcMAp Above is the EMF as it appears in Word.
... View more
11-10-2015
09:48 AM
|
0
|
10
|
7718
|
|
POST
|
Yes, I have seen this behavior many time in 10.3. I was considering an upgrade to 10.3.1 hoping to solve this very issue but I see now that there is no point to do the upgrade. Thanks for posting the (time consuming) workaround.
... View more
10-29-2015
11:04 AM
|
0
|
0
|
5582
|
|
POST
|
Oh, wait, never mind. I found this link: ArcGIS Desktop
... View more
10-27-2015
09:07 AM
|
0
|
0
|
678
|
|
POST
|
I have a Model Builder model that uses a feature set to l prompt the user to draw a line in the data view. The model calls a Python script and calculates the true north azimuth of that line, labels the line with the azimuth value, and adds that new layer to the table of contents (all outside of an edit session!). My problem---I have a layer file stored in the same directory as the toolbox, model, and script. The layer file stores symbology (which is an arrow head and the end of the line). In the script I can define a full path to the layer file to import symbology to the newly created line, but I am looking to use relative paths to define that symbology so that when I share the tool, the user will not have to alter any code. I know from the ESRI help that You cannot type relative paths (using the dot and double-dot notation) in any ArcGIS application. Nor can you use relative paths in Python scripts. A relative path cannot span disk drives. For example, if your current directory is on drive D, you cannot use relative paths to navigate to any directory on the E drive. But, since I am using an ArcGIS Feature Set via a model to get the input from the user I wonder if there is some workaround.
... View more
10-27-2015
08:40 AM
|
0
|
1
|
2691
|
|
POST
|
Luke, shouldn't that be: lyr = arcpy.mapping.Layer(tempFC) arcpy.mapping.AddLayer(mxd.activeDataFrame, lyr,"TOP") In any case, it is still not working.
... View more
10-26-2015
08:47 AM
|
0
|
2
|
1309
|
|
POST
|
I don't get any errors, the code executes fine, but nothing is added to the TOC.
... View more
10-26-2015
08:42 AM
|
0
|
0
|
1309
|
|
POST
|
Dan, I am on ArcGIS 10.3 with Python 2.7 Here is the link to the ESRI help from ArcGIS 10 ArcGIS Desktop I did alter the code to have only one except statement but that was not the cause of the troubles...
... View more
10-26-2015
08:42 AM
|
0
|
0
|
2345
|
|
POST
|
Luke, sorry, nope, neither solutions worked.. arcpy.mapping.AddLayer(mxd.activeDataFrame, tempFC,"TOP") arcpy.mapping.AddLayer(mxd.activeDataFrame, "in_memory\\tempFC","TOP") ...but you are right about the two different error handlers. I have been using that method (copied from the ESRI arcpy examples) for years.
... View more
10-26-2015
08:31 AM
|
0
|
6
|
1310
|
|
POST
|
I have Python code that uses a Model Builder Feature Set as an input to prompt the user to manually create a line inside the data view of the active data frame. Then Python code calculates the grid north azimuth and the true north azimuth of the line and prints those values to the geoprocessing results window. The feature set (and code) create in_memory data using CreateFeatureclass_management....That all works fine but what I want to do is add the in_memory data to the active data frame. I can get the name of the data frame using mxd.activeDataFrame.name but adding the layer is not working. See my code around line 72 - 74. Any help is appreciated. try:
import sys, traceback
import arcpy
import time, math
arcpy.AddMessage("\nGet the Azimuth From A User Defined Line.")
arcpy.AddMessage("Created by Gerry Gabrisch GISP, GIS Manager Lummi Indian Business Council, geraldg@lummi-nsn.gov\n")
arcpy.env.overwriteOutput = True
inFC = arcpy.GetParameterAsText(0)
outFL = "outFL"
outlayer = "outlayer"
arcpy.MakeFeatureLayer_management(inFC, outFL)
arcpy.SaveToLayerFile_management(outFL, outlayer)
def cart2pol(x, y):
rho = math.sqrt(x**2 + y**2)
phi = math.atan2(y, x)
return(rho, phi)
def UnitCircleDegreesToTrueNorthAzimuth(theta):
'''Converts Arithmatic Degrees (East = 0 then counter clockwise)
to Geographic Degrees (North = 0 then clockwise).'''
import math
#theta = math.degrees(theta)
theta = theta - 90.0
if theta < 0:
theta = theta + 360.0
theta = -1*(theta * 2 * math.pi / 360.0)
return 360.0 + math.degrees(theta)
for row in arcpy.da.SearchCursor(inFC, ["OID@", "SHAPE@"]):
#Set start point
startpt = row[1].firstPoint
startX = startpt.X
startY = startpt.Y
endpt = row[1].lastPoint
endX = endpt.X
endY = endpt.Y
arcpy.AddMessage("Normalizing coordinates...")
x = endX - startX
y = endY - startY
arcpy.AddMessage("Radians, degrees, and grid convergence, oh my!\n")
pol = cart2pol(x, y)
degs = math.degrees(pol[1])
azi = UnitCircleDegreesToTrueNorthAzimuth(degs)
mxd = arcpy.mapping.MapDocument("CURRENT")
spacRef = mxd.activeDataFrame.spatialReference
tempFC = arcpy.CreateFeatureclass_management("in_memory", "tempFC", geometry_type = "POINT", spatial_reference = spacRef )
arcpy.AddField_management(tempFC, "angle", "DOUBLE")
cursor = arcpy.da.InsertCursor(tempFC, ["SHAPE@XY"])
xy = (startX, startY)
cursor.insertRow([xy])
arcpy.CalculateGridConvergenceAngle_cartography(tempFC, "angle")
for row in arcpy.da.SearchCursor(tempFC, ["angle"]):
convergence = row[0]
arcpy.AddMessage("Line azimuth from grid north in degrees = " + str(azi))
azi = str(azi + convergence)
arcpy.AddMessage("Line azimuth from true north in degrees= " + azi)
arcpy.mapping.AddLayer(mxd.activeDataFrame.name, tempFC, "TOP")
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
time.sleep(10)
arcpy.AddMessage("\nClosing")
except arcpy.ExecuteError:
msgs = arcpy.GetMessages(2)
arcpy.AddError(msgs)
arcpy.AddMessage(msgs)
except:
tb = sys.exc_info()[2]
tbinfo = traceback.format_tb(tb)[0]
pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])
print pymsg
... View more
10-26-2015
08:10 AM
|
0
|
16
|
6291
|
|
POST
|
I have a Python script that will automatically; export the current MXD to a JPG in the same directory as the MXD, name the JPG the same as the MXD with a date added on, store the path to the MXD in a CSV file (including the requester's name), and optionally open the JPG and/or the file location in with Windows Explorer. I would like to improve the script by ensuring that the output JPG is clipped to all graphic elements. Exporting the JPG clipped to the graphic extent is an option if you export via the File-Export Map menu but there is not a handy way of getting those values in Arcpy.mapping. I know I could iterate through all the map elements and identify the xy min/max values, and I am guessing I could clip the output graphic using the Python Image Library. Does anyone have a arcpy.mapping solution to limiting the export JPG to the same extent as the map elements and not the same size as the page size?
... View more
10-13-2015
10:13 AM
|
0
|
7
|
4697
|
|
POST
|
The link to the old create perpendicular lines tools referenced above is pointing to a deprecated version of the tool (one of my first stabs at Python). The link below points to the most recent version, an ArcToolbox script, which now allows the user to create perpendicular lines at the mid-point, the start point, or the end point of the line, and to the right/left/or both sides of the line. GitHub - gerry1138/Create-Perpendicular-Lines: An ArcGIS ArcToolbox/Arcpy tool to create perpendicular lines to an exist…
... View more
08-05-2015
08:17 AM
|
0
|
2
|
4750
|
|
POST
|
Do you have an interpolated surface as a raster dataset? If so, you can create the points using one of several python tools out there, then use add surface information tool in the 3D-ArcToolbox to populate the points with the interpolated value from the interpolated raster.
... View more
07-13-2015
11:37 AM
|
0
|
0
|
4049
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-26-2025 08:30 AM | |
| 1 | 10-29-2024 03:51 PM | |
| 1 | 06-26-2024 08:32 AM | |
| 1 | 12-06-2023 11:53 AM | |
| 1 | 06-12-2012 07:42 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2025
02:21 PM
|