3

I have FGDB with points feature classes that I want to convert to lines using using a ready-made script called TrackBuilder. I am using model builder:

Model

When I populate the Track Builder script tool with the parameters everything looks fine. But when I validate the tool goes white

Validated model

WHY?

The beginning of the Track Builder script looks like this:

import arcpy, os, sys, traceback, datetime, math, re
## Input Paramaters
sInputFile = arcpy.GetParameterAsText(0)
sID_Field = arcpy.GetParameterAsText(1)
sDT_Field = arcpy.GetParameterAsText(2)
sOutWorkspace = arcpy.GetParameterAsText(3)
sOutName = arcpy.GetParameterAsText(4)
sLineMethod = arcpy.GetParameterAsText(5)
sMaxTimeMinutes = arcpy.GetParameterAsText(6)
sMaxDistMiles = arcpy.GetParameterAsText(7)
sIntervalHours = arcpy.GetParameterAsText(8)
sAddVoyageData = arcpy.GetParameterAsText(9)
voyageTable = arcpy.GetParameterAsText(10)
voyageMethod = arcpy.GetParameterAsText(11)
sAddVesselData = arcpy.GetParameterAsText(12)
vesselTable = arcpy.GetParameterAsText(13)

According to the TrackBuilder instructions the input point should be a feature class containing a date field and an unique number for each ship.

Everything looks correct here:

enter image description here

The whole TrackBuilder script can be found here

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Sep 3, 2015 at 18:48
3
  • 1
    When a tool goes white during validation that is saying that one or more parameters are invalid. We can't tell from your screen shot. For example the iterator is passing out a FeatureClass but is your input requirement a FeatureLayer? You need to make your model, toolbox and code available to others if you want an answer to this question? Commented Sep 3, 2015 at 19:54
  • You are right. Already edited! Commented Sep 4, 2015 at 7:25
  • What happens when you create a simpler model with just the TrackBuilder tool and its inputs (no iterator)? Will it validate and then run successfully? Commented Sep 16, 2016 at 23:34

1 Answer 1

-1

This is alternative way to convert point to line using arcpy:

How to create lines from points pair coordinates with arcpy?

answered Sep 4, 2015 at 7:48
1
  • Thanks! TrackBuilder script can segment the line according to time and distance which is useful for our analysis and the reason why we are using it. Commented Sep 4, 2015 at 8:08

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.