Revit API PickPoint过滤条件
//过滤选择,加上过滤条件,没有看出来差别。
[TransactionAttribute(Autodesk.Revit.Attributes.TransactionMode.Manual)]
public class cmd : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string messages, ElementSet elements)
{
UIApplication uiApp = commandData.Application;
Document doc = uiApp.ActiveUIDocument.Document;
Selection sel = uiApp.ActiveUIDocument.Selection;
Transaction ts = new Transaction(doc, "http://revit.5d6d.com");
ts.Start();
ObjectSnapTypes snapTypes = ObjectSnapTypes.Endpoints | ObjectSnapTypes.Intersections;
//XYZ point = uiApp.ActiveUIDocument.Selection.PickPoint(snapTypes, "选择端点或交点:");
XYZ point = uiApp.ActiveUIDocument.Selection.PickPoint("选择端点或交点:");
TaskDialog.Show("info", point.ToString());
ts.Commit();
return Result.Succeeded;
}
}
[TransactionAttribute(Autodesk.Revit.Attributes.TransactionMode.Manual)]
public class cmd : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string messages, ElementSet elements)
{
UIApplication uiApp = commandData.Application;
Document doc = uiApp.ActiveUIDocument.Document;
Selection sel = uiApp.ActiveUIDocument.Selection;
Transaction ts = new Transaction(doc, "http://revit.5d6d.com");
ts.Start();
ObjectSnapTypes snapTypes = ObjectSnapTypes.Endpoints | ObjectSnapTypes.Intersections;
//XYZ point = uiApp.ActiveUIDocument.Selection.PickPoint(snapTypes, "选择端点或交点:");
XYZ point = uiApp.ActiveUIDocument.Selection.PickPoint("选择端点或交点:");
TaskDialog.Show("info", point.ToString());
ts.Commit();
return Result.Succeeded;
}
}
我这个博客废弃不用了,今天想寻找外链的时候,突然想到这个博客权重很高。
有需要免费外链的,留言即可,我准备把这个博客变成免费的友情链接站点。