简介:Revit API—元素操作(Element) 对特定元素的编辑操作,基本都是通过ElementId来锁定元素的。 1、元素移动 ElementTransformUtils.MoveElement 此处无法实现,原因未知 ElementFilter categoryfilter = new ElementCategoryFilter(BuiltInCategory.OST_GenericModel);ElementFilter classfilter = new ElementClassFilter(typeo...
LocationCurve locCurve = pipe.LocationasLocationCurve; XYZ pipeMid = locCurve.Curve.Evaluate(0.275,true); IndependentTag tag = doc.Create.NewTag(view, pipe,false, tageMode, tagOri, pipeMid); //遍历类型 FilteredElementCollector filterColl = GetElementsOfType(doc,typeof(FamilySymbol), BuiltInCa...
{publicvoidAddElementsToWorkSet(Document doc, List<Element>elements) {if(doc.IsWorkshared ==true) {varworkset =GetWorkset(doc);if(workset !=null) {varworksetID =workset.Id.IntegerValue;using(Transaction tran =newTransaction(doc,"[ToolSet] Add Elemens To WorkSet")) { tran.Start();for...
系统只按默认的上次的选择进行创建,不能实现一件标记,那么接下来该怎么做呢? 这里只需要用到一句话: tagg.ChangeTypeId(id); 和上边的代码全部整合: 代码语言:javascript 复制 FilteredElementCollector fil=newFilteredElementCollector(doc,uiDoc.ActiveView.Id);fil.OfCategory(BuiltInCategory.OST_StructuralFraming)...
publicResult Execute(ExternalCommandData commandData,refstringmessages, ElementSet elements) { UIApplication app = commandData.Application; Document doc = app.ActiveUIDocument.Document; //1.选择房间 Selection sel = app.ActiveUIDocument.Selection; ...
Every category in the family library has a pre-made tag. Some tags are automatically loaded with the default Revit application template, while others are loaded manually. The IndependentTag objects return different categories based on the host element if it is created using the By Category option...
foreach(Element el in fil) { IndependentTag tagg = doc.Create.NewTag(doc.ActiveView, el, true, TagMode.TM_ADDBY_CATEGORY, TagOrientation.Vertical, new XYZ (0,0,0));//给每一夸梁进行标记 } 实现的效果: 系统只按默认的上次的选择进行创建,不能实现一件标记,那么接下来该怎么做呢?
在Revit平台API中,可以直接创建一个ElementId,然后关联一个唯一的整数值到此新ElementId,新ElementId默认值是0 In the Revit Platform API, you can create an ElementId directly, and then associate a unique integer value to the new ElementId. The new ElementId value is 0 by default. ...
For more information about Revit Element classification, refer toElements Essentials. 关于Revit图元分类的详细信息,请参阅1.5节图元概要 尺寸和限制条件 Dimensions and Constraints 类表示永久性尺寸和相关限制条件图元尺寸。用户界面中编辑图元产生的临时尺寸是无法访问的。而高程点和高程点坐标是由SpotDimnension类来...
Revit API—元素过滤器(ElementFilter) 简介:Revit API—元素过滤器(ElementFilter) 一、过滤器简写: levelFilter.OfCategory(BuiltInCategory.OST.OST_Levels).OfClass(typeof(FamilyInstance).WhereE 注:标高属于没有元素类型的元素 WhereElementIsNotElementType()...