在进行新的Selection.Pickpoint时,如何获得现有XYZ的距离和角度?

时间:2017-04-19 15:29:43

标签: c# revit-api

在AutoLisp中,(getpoint ....)实用程序提供了一个额外的点变量参数,它允许新的点变量与现有点相对。表格是(getpoint RefPt“Next Point Where?”)。如何使用C#在Revit中调用相同的方法?

//I have used the following code to invoke various snaps
//But none of the ObjectSnapTypes seemed to offer a reference point

ObjectSnapTypes Snapper = ObjectSnapTypes.Intersections | ObjectSnapTypes.Midpoints | ObjectSnapTypes.Endpoints;
XYZ CopyFrom = uiDoc.Selection.PickPoint(Snapper, "Copy From Where?");
Snapper = ObjectSnapTypes.Perpendicular | ObjectSnapTypes.Midpoints | ObjectSnapTypes.Intersections | ObjectSnapTypes.Endpoints;
XYZ CopyTo = uiDoc.Selection.PickPoint(Snapper, "Copy To Where");
//is there any way to get this "Copy To Where" to drag a vector with angle and distance?
//similar to the vector offered during Revit's "Copy" command?
XYZ porgy = CopyTo - CopyFrom;

1 个答案:

答案 0 :(得分:0)

Revit API PickPoint方法不支持AutoLISP getpoint提供的橡皮筋,参见

http://www.revitapidocs.com/2017/a1d40214-13d6-2e11-36bb-905d49105168.htm