use_ArcGIS: Connect to ArcGIS Python

Description Usage Arguments Details Note See Also Examples

View source: R/connect.r

Description

Connect to the ArcGIS Python environment.

Usage

1
use_ArcGIS(pro, pythonpath)

Arguments

pro

If TRUE, attempt to connect to an ArcGIS Pro Python distribution. Otherwise, attempt to connect to an ArcGIS Desktop Python distribution. Ignored if python is provided.

pythonpath

(ArcGIS Desktop only) Path to the ArcGIS Desktop Python binary. If missing, the function will attempt to automatically detect an appropriate Python installation.

condaenv

(ArcGIS Pro only). The ArcGIS Pro Conda environment to use. If missing, the function will attempt to automatically detect the default Conda environment.

installpath

(ArcGIS Pro only). The ArcGIS Pro installation directory. If missing, the function will attempt to automatically detect the installation directory.

Details

The following settings from options() will be used to populate missing arguments:

Note

(For ArcGIS Pro) The ArcGIS Pro bin folder (typically C:\Program Files\ArcGIS\Pro\bin) must be added to the PATH variable before the Conda Environment is loaded. For users with adminstrator privileges, withr::with_path() is used to temporarily add the ArcGIS Pro bin folder to the path. Users without adminstrator privileges may need to manually add the bin folder to their user PATH variable before starting an R session.

See Also

find_ArcGIS

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Try to autodetect ArcGIS Pro installation
use_ArcGIS()

# connect to the 32-bit ArcGIS Desktop 10.2 Python environment
use_ArcGIS("C:/Python27/ArcGIS10.2")


## End(Not run)

mkoohafkan/arcpy documentation built on Aug. 9, 2020, 2:51 p.m.