More scripts: Vector
Syntax Highlighing:
comments, key words, predefined symbols, class members & methods, functions & classes
#use with cb_wells to connect the dots
clear();
vector vect1, vect2;
class Georef georef;
GetInputVector(vect1);
GetOutputVector(vect2);
VectorToolkitInit(vect2);
numeric numpoints = vect1.$Info.NumPoints;
array numeric x[numpoints], y[numpoints];
numeric i;
for i = 1 to numpoints
{
print(vect1.point.Internal[@i].ElemNum);
x[i] = vect1.point.Internal[@i].x;
y[i] = vect1.point.Internal[@i].y;
print(x[i], ",", y[i]);
}
x[numpoints] = x[1];
y[numpoints] = y[1];
georef = GetLastUsedGeorefObject(vect1);
CopyGeorefToObject(vect2, georef);
VectorAddLine(vect2, numpoints, x, y);
VectorValidate(vect2);
CloseVector(vect1);
CloseVector(vect2);