Select to view content in your preferred language

Help with the geoprocessing widget.

3769
12
08-10-2011 10:26 AM
SeanCook
Emerging Contributor
Hello all,

I am trying to get the geoprocessing widget working with a simple buffer tool created based on this:

http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/GP_service_st...

However, when I try to run the tool I receive a error:

Possible issues:

1. The tool says the output is a point on the services directory:


Parameter: Output_Polygons

    Data Type: GPFeatureRecordSetLayer
    Display Name: Output Polygons
    Direction: esriGPParameterDirectionOutput
    Default Value:
        Geometry Type: esriGeometryPoint
        Spatial Reference: 4326
       


2. I cannot figure how to run the tool in Arc Desktop from the server. The tool box does not expand. The help file linked to above indicates that it should.

Here is my geprocessing widget code, for a buffer tool. Does it look correct? Any glaring errors?

<?xml version="1.0"?>
<configuration label="Buffer Tool">
    <taskurl>http://nsesribap01vm/ArcGIS/rest/services/BufferService/GPServer/Buffer%20Points</taskurl>
    <inputparams>
        <param name="PointEntry"
               geometrytype="point"
               label="Start location"
               required="true"
               type="featurerecordset"
               visible="true">
            <renderer type="simple">
                <defaultsymbol color="0xBEEFEE"
                               size="15"
                               type="simplemarker">
                    <outline width="2" color="0x00AADD"/>
                </defaultsymbol>
            </renderer>
        </param>
        <param name="Distance"
               defaultvalue="3:Miles"
               label="Buffer Distance"
               required="true"
               type="string"
               visible="false"/>
    </inputparams>
    <outputparams>
        <param name="BufferOuput"
               geometrytype="polygon"
               label="Output Buffer"
               required="true"
               type="featurerecordset"
               visible="true">
            <renderer attribute="Site" type="uniquevalue">
                <defaultsymbol alpha="0.5"
                               color="0xFF00FF"
                               type="simplefill">
                    <outline color="0x000000"/>
                </defaultsymbol>
                <infos>
                    <symbol color="0xFF0000"
                            type="simplefill"
                            value=" ">
                        <outline color="0x000000"/>
                    </symbol>

                </infos>
            </renderer>
        </param>
    </outputparams>
    <layerorder>PointEntry, BufferOutput</layerorder>
</configuration>
Tags (2)
0 Kudos
12 Replies
jamesdiaz
Deactivated User
hey im also working on a buffer widget I got mines to work but its SLOWWW

try changing your distance param name to this

        <param name="Distance"
               defaultvalue="3:Miles"
               type="linearunit"
               label="Buffer Distance"
               required="true"
               visible="true">
   <choicelist>
                <choice value="esriMeters"/>
                <choice value="esriFeet"/>

and your BufferOuput param to

       <param name="BufferOuput"
               geometrytype="polygon"
               label="Buffer"
               required="true"
               type="featurerecordset"
               visible="true">
            <renderer type="simple">
                <defaultsymbol alpha="0.5"
                               color="0xFF00FF"
                               type="simplefill">
                    <outline color="0x000000"/>
                </defaultsymbol>
            </renderer>
        </param>
0 Kudos
SeanCook
Emerging Contributor
Slow but functional might be a nice step forward for me!

Does your tool in the services directory say that its output is a point like I mentioned for point 1?
0 Kudos
SeanCook
Emerging Contributor
Ok, got the buffer tool running...thanks for the help!

Another question that is driving me crazy: How do I use a layer in a model on the server?! I can create a functional model....in this case one which does a buffer, selects points from a layer, then does summary statistics on those points.

However, I cannot upload this model and have it work. At best I can get it to return an empty record set. I can move the tool to the table of contents and reference a layer in the map, but then my publish fails.

The data extract widget is a good example of one which references multiple layers, but I don't know how it's done and as far as I can tell it is explained nowhere. Any help is very much appreciated!

Thank in advance,

Sean
0 Kudos
jamesdiaz
Deactivated User
take a look at the make feature layer tool
0 Kudos
SeanCook
Emerging Contributor
take a look at the make feature layer tool

I tinkered with it a bit but didn't see its relevance. I am trying to publish a mxd with a Tool layer. have you ever got this to work?

I keep getting:

Service was published but cannot be started due to: Configuration BuffTest.MapServer can not be started.

Server Object instance creation failed on machine nsesribap01vm.
0 Kudos
jamesdiaz
Deactivated User
seems like a scratchworkspace issue. why not just publish the toolbox direct?
0 Kudos
SeanCook
Emerging Contributor
seems like a scratchworkspace issue. why not just publish the toolbox direct?


I would love to, but I have been trying for something like 8 hours to figure out how to use a layer in a tool and I cannot get it to work. I was hoping this would work.

I have a tool, model shown below. I can get the buffer to work, and I can get it to execute all the way though with an empty output...what I cannot do is figure out how to use the store layer in the model. Where should it be stored? What type of file should it be? Can it be on the server? Does it have to be in the map the tool is used on? Etc, etc, etc. All I want is to be be able to use a layer of any type in a tool and I can die happy.

All the model does is select stores and return a count.
0 Kudos
SeanCook
Emerging Contributor
What should a proper scratch workspace filename look like? You don't use relative path names do you? Mine is currently set to:

B:\ArcGIS\Temp_Data\BufferPts\Scratch

Where B the drive letter I assigned to my server. Could that be correct, or is there a fatal flaw?
0 Kudos
jamesdiaz
Deactivated User
use make feature layer for your stores as the input for your select layer by location
0 Kudos