Initiating a "Target for ArcGIS Pro" process through arcpy environment

If i run the "Convert Geosoft Grids" tool (Target for ArcGIS Pro) - no issues with the conversion

But, if i use the arcpy code "arcpy.geosoftarcpy.ConvertGeosoftGrids" i am getting AttributeError: module 'arcpy' has no attribute 'geosoftarcpy' error. Any solution ?


Comments

  • Hi,

    To access the toolbox within Python code via arcpy one has to import the toolbox first, e.g.:
    arcpy.ImportToolbox(r'C:\Program Files\ArcGIS\Pro\Resources\ArcToolBox\Toolboxes\Geosoft Tools.pyt')
    
    or in the next version (where the AddIn is installed per-user):

    arcpy.ImportToolbox(r'C:\Users\MyUser\AppData\Local\Programs\Geosoft\Add-In for ArcGIS Pro\toolbox\Geosoft Tools.pyt')

    Hope this helps,

    Jacques Beaurain
  • Ah. I've totally forgotten the "Import Toolbox" part. Thanks. Worked perfectly.
This discussion has been closed.