After creating an arc, even if you use the StartPoint of ARC (Curve), you may get an end point instead of a start point.
Is there a way to get the starting point when I draw a line?
*The same is true when acquired from the program
using(Transaction acTrans=acDb.TransactionManager.StartTransaction())
{
PromptSelectionResultres=acEdr.GetSelection();
if(res.Status==PromptStatus.OK)
{
foreach(ObjectIdobjId in res.Value.GetObjectIds())
{
using (Entityent=acTrans.GetObject(objId, OpenMode.ForRead) as Entity)
{
if(ent is Arc)
{
// For arcs, get start and end points (reversed)
Point 3d startPoint = arc.StartPoint;
Point 3endPoint = arc.StartPoint;
}
}
}
}
}
Is there a way to get the starting point when I draw a line?
The first point of the arc line cannot be obtained from the Arc (ARC) property.
The API specification for circular arcs does not indicate the order in which the dots are set.
Curve.StartPoint and Curve.EndPoint are set with the counterclockwise direction as positive.
If the program supports it,
Right before you add an ARC object to the database by combining APIs such as
Keep the coordinates of the first clicked point in the extended data of the ARC object.
Obtain the first click point from the extended data of the ARC object
You can use this method.
© 2024 OneMinuteCode. All rights reserved.