Well this is a interesting....
I took the previous code and applied it to what i intended. But i get a completely different result.
The circles in the image are generated from the same PointCalc method i mentioned above. When applied to the Structural columns, the appear offset to the wall.
What i dont get, is its the exact same point the circles were created on.
the new columns on the right should be in the same as the circles.

List<XYZ> pts = StudSpaceing(1, c);
using (Transaction t = new Transaction(doc, "StudSpacingTest"))
{
t.Start();
foreach (XYZ p in pts)
{
//Copying a stud from exsisting one, thought that was the easist way to set the same params, etc.
ElementTransformUtils.CopyElement(doc,studs.First(),p);
CreateCircle(doc,p,0.125);
}
doc.Delete(studs);
t.Commit();
}
//Helper Functions:
private XYZ PointCalc(XYZ start, XYZ end, double distance)
{
// Origin point
Double origin_x = start.X;
Double origin_y = start.Y;
// Point you are moving toward
Double to_x = end.X;
Double to_y = end.Y;
Double fi = Math.Atan2(to_y - origin_y, to_x - origin_x);
// Your final point
Double final_x = origin_x + distance * Math.Cos(fi);
Double final_y = origin_y + distance * Math.Sin(fi);
XYZ xyz = new XYZ(final_x, final_y, end.Z);
return xyz;
}
private List<XYZ> StudSpaceing(double dist, Curve c)
{
// Extract data from the selected curve.
Curve curve = c;
List<XYZ> pts = new List<XYZ>();
double length = c.Length;
XYZ start = curve.GetEndPoint( 0 );
XYZ end = curve.GetEndPoint(1);
pts.Add(start);
XYZ point = start;
while (start.DistanceTo(point) < length)
{
point = PointCalc(point, end, dist);
pts.Add(point);
}
return pts;
}
//Circle Creation Function:
public DetailArc CreateCircle(
Document doc,
XYZ location,
double radius )
{
XYZ norm = XYZ.BasisZ;
double startAngle = 0;
double endAngle = 2 * Math.PI;
Plane plane = new Plane( norm, location );
Arc arc = Arc.Create( plane,
radius, startAngle, endAngle );
return doc.Create.NewDetailCurve(
doc.ActiveView, arc ) as DetailArc;
}