There are several ways to determine the points.
Have a play with this for one way using Vector Geometry.
/********************************************************************
created: 2007-12-25 15:56
file path: .....\Visual Studio 2008\CAD Projects\VectorTest02\VectorTest02
file base: Commands.cs
CodeHimBelonga: kwb
Description: Test Routine for theswamp forum question
http://www.theswamp.org/index.php?topic=20656.msg251042#msg251042
*********************************************************************/
using System;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.Runtime;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;
using Acdb = Autodesk.AutoCAD.DatabaseServices;
[assembly: CommandClass(typeof(VectorTest02.TestCommands))]
namespace VectorTest02
{
/// <summary>
/// Summary description for TestCommands Class.
/// </summary>
public class TestCommands
{
[CommandMethod("VT02")]
static public void test()
{
Document Doc = AcadApp.DocumentManager.MdiActiveDocument;
Editor Ed = Doc.Editor;
PromptPointResult ppr1 = Ed.GetPoint("\Select the Vector Origin Point: ");
PromptPointOptions ppo2 = new PromptPointOptions("\nSelect second point: ");
ppo2.BasePoint = ppr1.Value;
ppo2.UseBasePoint = true;
ppo2.UseDashedLine = true;
PromptPointResult ppr02 = Ed.GetPoint(ppo2);
Point3d pt1 = ppr1.Value;
Point3d pt2 = ppr02.Value;
Vector3d vec3d = (Vector3d)(pt2 - pt1);
//
PromptDistanceOptions pdo1 = new PromptDistanceOptions("\nSpacing along Vector: ");
pdo1.AllowNegative = false;
pdo1.AllowZero = false;
pdo1.AllowNone = false;
pdo1.UseDashedLine = true;
pdo1.DefaultValue = 10.0;
PromptDoubleResult res = Ed.GetDistance(pdo1);
Double spacingDistance = res.Value;
Double wpDistance = pt1.DistanceTo(pt2);
//
Ed.WriteMessage("\nDistance: {0} \nSpacing: {1} \nVector: {2}",
wpDistance.ToString(),
spacingDistance.ToString(),
vec3d.ToString()
);
Vector3d spacingVector = vec3d.MultiplyBy(spacingDistance / wpDistance);
Ed.WriteMessage("\nspacingVector: {0} \nspacingVectorDistance {1}",
spacingVector.ToString(),
spacingVector.Length.ToString()
);
int steps = (int)(wpDistance / spacingDistance);
Point3dCollection PointList = new Point3dCollection();
for (int i = 1 ; i <= steps ; i++)
{
Point3d nextPoint = pt1.Add(spacingVector.MultiplyBy(i));
PointList.Add(nextPoint);
}
foreach ( Point3d pt in PointList )
{
Ed.WriteMessage("\nPoint: {0}",
pt.ToString()
);
}
}
}
}
Piccy added (log-In to view)