# Creating the Feed Line

Create a feed line with start point (0, 0, 0) , end point (0, 0, -0.551) and label Feedline.

myPoint1 = cf.Point(0, 0, 0)
myPoint2 = cf.Point(0, 0, -0.551)
myLine.Label = "Feedline"
1. Define two points, myPoint1 and mypoint2 (see Defining a Point).
myPoint1 = cf.Point(0, 0, 0)
myPoint2 = cf.Point(0, 0, -0.551)
2. A line is a geometry object and since there may be multiple geometry objects in the model, it is part of the GeometryCollection.
3. Search for GeometryCollection in the Help1.
4. In the Help, under GeometryCollection > Method List, search for methods that are applicable to lines:
• AddLine (startpoint Point, endpoint Point)
To create a line, we will use the method:
AddLine(startpoint Point, endpoint Point)
5. Fill in the startpoint and endpoint (use the points, myPoint1 and myPoint2):
AddLine(myPoint1, myPoint2)
6. Determine the syntax to prepend to AddLine:
1. Since AddLine is a method, it is indicated by prepending a “:” (colon).
:AddLine(myPoint1, myPoint2)
2. In the Help, under GeometryCollection > Usage locations, note the following:
ModelContents object has collection Geometry.2
3. Click ModelContents.
4. In the Help, under ModelContents > Usage locations, note the following:
Model object has property Contents3
Since we know that Model is the one of the top levels in the model tree, the result is then:
Contents.Geometry:AddLine(myPoint1, myPoint2)
5. Since the project is the highest level, we prepend our reference to the project:
myProject.Contents.Geometry:AddLine(myPoint1, myPoint2)
7. Add a reference to the newly created line:
myLine = myProject.Contents.Geometry:AddLine(myPoint1, myPoint2)
8. Set the line label to Feedline:
myLine.Label = "Feedline"
Tip: View the Line (object) in the Help for a short example.
1 The API is available in the Feko Scripting and API Reference Guide (PDF) or Feko WebHelp.
2 The part that is prepended to the method, maps to the CADFEKO model tree structure.
3 The part that is prepended to the method, maps to the CADFEKO model tree structure.