That would seem easy enough to do. I would suggest doing the params like this though:
STARTING POSITION
ENDING POSITION
CLASSNAME OF FENCE
DIRECTION OFFSET (true/false, see below)
LENGTH OF EACH FENCE SEGMENT
Internally, the script would figure out the direction between the two positions, the distance between them, and divide that by the length of the fence segment, to give the number of segments to make. You also might make a sort of 'database' internally in the program, that would have pre-recorded values for the length of various fence segments from the EU; fences not included in this 'database' would still need you to enter in a value.
Since some fences run east-west when they are set at 0 direction, and some run north-south when at 0 direction, you would need a variable to tell the script which one of these the fence does.