I cannot explain why, but after a few more weeks working with this ArcGIS Pro project and ArcPy script, none of it targeted at trying to prevent the thick lines and blockiness, the symptoms of concern all disappeared.
I am hoping that they do not come back. If they do, for me or anyone else, my plan of attack would be to:
- Try exporting a PDF from the ArcGIS Pro layout WITHOUT running any ArcPy code to manipulate it. This should allow the source of the problem to be isolated to either the project itself or the ArcPy script.
- If it is the project then take a copy of it and on that copy start removing elements not needed to create those where the symptoms manifest to see if something can be shown to be the thing that is added to the project to cause them to appear.
- If it is the script then take a copy of it and on that copy start removing code not needed to create/manipulate the elements where the symptoms manifest to see if some code can be shown to be the thing that is added to the script to cause them to appear.
There are a few different ways you can get VS Code to work with ArcGIS Pro Python. I'm not going to list them all, just the way I've started using for every thing I do.
- Make sure you have the Python extension for VS Code installed from the Marketplace
- Press CTRL + , (comma) to open the settings. From here if you type
pythonpath
it'll filter down to some Python specific places under your User settings. Update the following (if the path I used below doesn't match, update as needed)
Python > Auto Complete > Typeshed Paths : C:/Program Files/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/python.exe
Python > Jedi Path : C:/Program Files/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/python.exe
NOTE -- If Intellisense (code-complete) doesn't seem to work, remove this setting, re-start VS Code and try again.
Python > Python Path : C:/Program Files/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/python.exe
Finally, I do all my development in a specific folder, generally new to whatever I'm working on. Inside that folder I have the VS Code recognized folder of .vscode
. Inside that folder are two files (depending how you setup, they'd be auto-created, but I just copy/paste these files from previous projects to quick-start). See the contents below for settings.json
and launch.json
.
When you start VS Code, make sure you Open Folder or Open Workspace, not just the file .py
file you're working on. That way Code knows about the .vscode
directory and it's contents.
settings.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "C:/Program Files/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/python.exe",
//"pythonPath": "C:/Users/khibma/AppData/Local/Programs/Python/Python37/python.exe",
//"pythonPath": C:/Python27/ArcGIS10.5/python.exe",
"program": "${file}",
"cwd": "${workspaceFolder}",
"env": {},
"envFile": "${workspaceFolder}/.env"
},
{
"name": "Python: Terminal (integrated)",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"cwd": "",
"console": "integratedTerminal",
"env": {},
"envFile": "${workspaceFolder}/.env",
"internalConsoleOptions": "neverOpen"
}
]
}
Best Answer
I agree with your comment:
Consequently, if this functionality is important to you I think you will need to submit an ArcGIS Idea. I think the title for it would be something like:
Somebody submitted an ArcGIS Idea for this titled:
and that idea has been given a status of Implemented at ArcGIS Pro 2.5:
While technically this does not add custom page sizes to the Layout Gallery it does provide an additional gallery of layout templates that you can customize and access using the Import Layout dropdown.
This functionality has been further described in a Esri blog titled Customize your layout gallery (ArcGIS Pro 2.5).