Bug in arcgisbinding R package --arc.env() not working

1581
3
Jump to solution
09-23-2016 05:48 AM
FrancescoTonini2
Occasional Contributor II

Everyone, 

I am using ArcGIS 10.3.1 and R >= 3.2.0. I noticed a strange behavior both in the sample R tools provided as well as my own custom R tool scripts when using the arc.env() function from the arcgisbindings R package. This function is supposed to retrieve the environment settings of the ArcGIS tool and pass it to R. However, script execution freezes and never completes when adding arc.env() to the script, e.g. to change the default scratch workspace path. Is this a bug?

For example, add arc.env() to the semiparam regression tool script to check issue above.

# Example:
tool_exec <- function(in_para, out_params)
{
env = arc.env()
wkspath <- env$workspace
...
return(out_params)
}

Any ideas why?

0 Kudos
1 Solution

Accepted Solutions
ShaunWalbridge
Esri Regular Contributor

Francesco ToniniDan Patterson‌ for completeness, Francesco reported a Github issue for this problem, and we solved it with the 1.0.0.123 release in November. Thanks!

View solution in original post

3 Replies
FrancescoTonini2
Occasional Contributor II

Dan_PattersonSWalbridge-esristaff‌ Do you have any insight on why arc.env() fails? Is this a bug?

0 Kudos
DanPatterson_Retired
MVP Emeritus

Francesco, I haven't had time to look at the R side of the code to see even if arc.env is a method or a property (arc.env() vs arc.env) so I will defer to others

0 Kudos
ShaunWalbridge
Esri Regular Contributor

Francesco ToniniDan Patterson‌ for completeness, Francesco reported a Github issue for this problem, and we solved it with the 1.0.0.123 release in November. Thanks!