Getting arcpy.AddMessage() to display message from script tool called from another sc

المشرف العام

Administrator
طاقم الإدارة
I am using a Python script tool within an ArcToolbox in ArcGIS 10.2.

The script calls another python script tool while running but does not display the messages from the called script when using the arcpy.AddMessage() method.

Example:

scribtbox (ArcToolbox)two script tools

  • script1
  • script2
script1:

import arcpy# output to the screenarcpy.AddMessage("Doing routine 1...")routine1()# call script2arcpy.script2_scriptboxscript2:

import arcpy# output to the screenarcpy.AddMessage("Doing routine 2...")routine2()The output model run dialog box in ArcGIS says:

> Doing routine 1...and then finishes without saying the message from script2.

I'd like it to say:

> Doing routine 1...> Doing routine 2...and then finish.

Is this functionality not built in, am I doing something wrong, or is there some other issue at hand.



أكثر...
 
أعلى