© 2010 Autodesk
Introduction to Revit 2011 API
ユーザ選択
 スナップの種類
§選択時のスナップの種類を定義が可能
§
§
§
§
§
§
§
§アクティブな作業平面を設定可能
§View.SketchPlane()
§
§
§
public void PickPoint(UIDocument uidoc)
{
     ObjectSnapTypes snapTypes = ObjectSnapTypes.Endpoints | ObjectSnapTypes.Intersections;
     XYZ point = uidoc.Selection.PickPoint(snapTypes, "Select an end point or intersection");
     string strCoords = "Selected point is " + point.ToString();
    TaskDialog.Show("Revit", strCoords);
}
PickPoint() メソッドは引数でオブジェクトスナップの種類を指定可能です。

また、アクティブな作業平面を設定してすることができるので、よれによりユーザに選択させる座標点を制御することができます。

このサンプルコードでは端点と交点にオブジェクトスナップを設定しています。