线角度是否始终为正?
**** Hidden Message ***** 您好,从我做的测试来看,这是一句台词。Angle属性返回WCS X轴与线在WCS XY平面上的投影之间的角度,以弧度为单位,在X范围内按couter顺时针测量(即始终为正)
公共静态无效测试()
{
var-ed=Application.DocumentManager.MdiActiveDocument.Editor
var-peo=newprompentityoptions(“\n选择行:”)
peo。SetRejectMessage(“\n所选对象不是一行”)
peo。AddAllowedClass(typeof(Line),true)
var per=ed.GetEntity(peo)
如果(per.Status==PromptStatus.OK)
{
使用(var tr=new OpenCloseTransaction())
{
var line=(line)tr.GetObject(per.ObjectId,OpenMode.ForRead)
ed.WriteMessage($”\nAngle={Converter.AngleToString(line.Angle)})
}
}
}
非常感谢,很高兴知道。
页:
[1]