在Revit中使用自适应族创建放样融合模型
大多数博客给出的方案都是如何在有自适应族的情况下进行修改定位点或是将数据传入自适应族,如何直接在族文件中创建自适应模型并将点转换为自适应点,连接自适应点成为自适应路径这种方式没有文章介绍.  下面的代码中给出了如何在自适应族文件中创建参照点并转换为自适应点连接成为路径,最终创建放样融合的办法. public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { var uiDoc = commandData.Application.ActiveUIDocument; // UIDocument var doc = uiDoc.Document; ...
Creating Adaptive Sweep Extrusions in Revit
A case study on creating an adaptive family essentially using a plane and model lines.This is a summary of an answer I posted on the Autodesk forum, now organized and published on CSDN. How to solve the issue of adaptive family flipping when moving adaptive points during secondary development If you directly use a profile family and read the profile family’s lines to creating geometry, you might encounter an issue where the shape mirrors after the path deflects. This happens because the norma...
在Revit中使用自适应族创建放样融合模型
创建一个平面与模型线最终创建自适应族的案例。这是一个我在Autodeks论坛回复的问题,这里整理一下发表在CSDN。二开时,如何解决自适应族,移动自适应点,自适应族发生翻转,如何解决 如果直接使用轮廓族,读取轮廓族的线段再继续创建,会出现路径发生偏转之后形状镜像显示的问题,这种情况出现的原因是因为refernce的附着面变化导致自适应族在路径偏移重新生成形状的时候发生的法向量的变化导致。如果需要将轮廓族与路径位置锁定,只需要直接获取轮廓族的refernce这样会和手动创建一样,随着路径的偏移自动创建新的正确形状。new Reference(familyInstances[i]) 代码: 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210...
Creating Adaptive Components with Code in Revit
Most blogs only cover how to modify positioning points or pass data into an existing adaptive family. There are no articles introducing how to directly create an adaptive model in a family file, convert points to adaptive points, and connect adaptive points to form an adaptive path.  The code below demonstrates how to create reference points in an adaptive family file, convert them to adaptive...
Autodesk AutoCAD .Net Creating PatternSet and Toolbar
The docking bar created by .Net cannot be placed at the bottom of the menu bar in 2016/2022 tests, it can only be fixed at the topmost position. Manual swapping also cannot complete this operation. PatternSetPatternSet is an AutoCAD interface. Through the interface, you can set the style of the toolbar and implant your own window into the toolbar. The required WPF window type is ‘UserControl’, which is added to the CAD toolbar as a subcategory. So both can be created separately and final...
Autodesk AutoCAD .Net 创建PatternSet和工具栏
.Net创建的停靠栏再2016/2022中测试无法放在菜单栏的下部只能在最上层的位置固定,手动调换的时候也无法完成这个操作。 PatternSetPatternSet 是AutoCAD的一个接口,通过接口可以设置工具栏的样式和将自己的窗口植入到工具栏中,其中需要的WPF窗口类型为‘UserControl’,作为子类别加入到CAD的工具栏中,所以两者可以单独创建最终使用借口连接到一起即可。 1234567891011121314151617181920212223242526272829303132public class PatternSetWindowCommand{ [CanBeNull] private static PaletteSet PSet { get; set; } = null; [CommandMethod("ShowWindow")] public void ShowWindowCommand() { if (PSet == null || PSet....
Implementing Multi-Category Tags in Revit
Method to implement Multi-Category Tags in Revit Keyword for Tag method: IndependentTag There are two methods for creating tags. The input parameters are basically the same, but there are some differences. The following description and image can help distinguish them better. First function: Creates a multi-category tag using an actual project coordinate point without needing to specify the tag type. Create Method (Document, ElementId, ElementId, Reference, Boolean, TagOrientation, XYZ) Se...
在Revit中实现多类别标记
实现Revit中多类别标记的方法 标记方法的关键词:IndependentTag 在创建标记中有两个方法,输入的参数基本一致,但是还是有所区别,下面描述和图片可以更好的区分第一个函数:通过实际的项目坐标点不需要制定标记类型创建多类别标记Create Method (Document, ElementId, ElementId, Reference, Boolean, TagOrientation, XYZ)第二个函数:通过UVPoint也就是在构件上面的点控制显示位置并且需要制定标记类别Create( Document document, ElementId ownerDBViewId, Reference referenceToTag, bool addLeader, TagMode tagMode, TagOrientation tagOrientation, XYZ pnt )  代码实例通过do...
Project Line to Surface using Brep in CAD
Nuget References Nuget: AutoCAD.NET.Interop AutoCAD-2016.Net.Base Reference Links Traversing a 3D solid’s brep using AutoCAD 2009’s new .NET API BrepBoundary Representation (BRep) is the most mature and unambiguous representation method in geometric modeling. The boundary of a solid is usually represented by the union of faces, and each face is represented by the surface it lies on plus its boundaries. The boundaries of a face are the union of edges, and edges are represented by vertices. B...
CAD中Brep的投影到面的API使用
引用Nuget Nuget: AutoCAD.NET.Interop AutoCAD-2016.Net.Base 参考链接 Traversing a 3D solid’s brep using AutoCAD 2009’s new .NET API Brep边界表示(Boundary Representation)也称为BRep表示,它是几何造型中最成熟、无二义的表示法。实体的边界通常是由面的并集来表示,而每个面又由它所在的曲面加上其边界来表示,面的边界是边的并集,而边又是由点来表示的。 CAD中Brep的结构 Brep Complex Shell Faces Vertex 备注CAD中的常规API图形操作都在Geometry中,但是仅有二维表达或是简单的三维表达,比如创建三维线段,布尔运算等,如果需要更加复杂的运算就需要用到Brep模块里面的功能,如果直接使用C++开发,可以直接找到AcadRegion并读取数据,如果使用Net开发,则需要引用上面提到的Interop包,并将object转换为Acad结构,即可读取。 dbRegion.AcadObject...
在Revit中临时隐藏和取消隐藏图元
临时隐藏,网络上面的代码有很多,我这里直接把代码放上来 1234//临时隐藏view.HideElementsTemporary(_HiddenElementIds);//隐藏view.HideElements(_HiddenElementIds); 但是大部分的博客只是讲了如何隐藏构件,但是现实构件的节点文章只是将构件显示的界面表达出来,但是在实际项目中,用户想的大部分还是直接取消临时隐藏模式,继续进行工作。这一篇文章讲的是如何启动Revit显示隐藏构件的窗口 revit二次开发隔离、隐藏图元 取消隐藏: 确认是否隐藏 1Element(id).IsHidden(view) 通过UnHide,API取消隐藏 1doc.ActiveView.UnhideElements(ids); 检查结果如果还没有出现,可能是因为视图的Mode问题 如果第三步出现问题,可以通过下面的接口,取消视图里面所有的显示模式,查看结果 1doc.ActiveView.TemporaryViewModes.DeactivateAllModes();
Temporary Hide and Unhide Elements in Revit API
There is a lot of code for temporary hiding on the internet. I’ll post the code directly here. 1234// Temporary Hideview.HideElementsTemporary(_HiddenElementIds);// Hideview.HideElements(_HiddenElementIds); Most blogs only explain how to hide elements, or just show the element display interface. However, in actual projects, what users mostly want is to directly cancel the temporary hide mode and continue working. This article explains how to invoke the window for showing hidden elements in R...
Creating Selection Filters in Revit
Filters are divided into Selection Filters and Rule-based Filters.For Rule-based Filters, you can refer to my previous article:Revit Secondary Development: Attaching Filters to Linked Models in Projects Selection Filters, as the name suggests, allow you to pass a collection of selected element IDs and add them to the view filter. In some scenarios, you need to filter and select specific elements, but when there is no common logic rule for filtering, you can choose to use a selection filter. H...
在Revit中创建选择过滤器
过滤器分为选择过滤器与规则过滤器规则过滤器可以看我之前写的这一篇文章:Revit二次开发在项目中给链接模型附加过滤器 选择过滤器顾名思义就是可以将选择的构件ID集合传入并加入到视图过滤器中,有一些场景需要对某些构件进行过滤选择,但是没有共同的逻辑规则进行筛选的情况下可以选择使用选择过滤器. 下面是我的代码,增加了截面填充突然与实体填充样式设置的代码: 12345678910111213var selectionFilter = SelectionFilterElement.Create(doc, "OutRange");selectionFilter.SetElementIds(targetElementIds); doc.ActiveView.AddFilter(selectionFilter.Id);var graphics = doc.ActiveView.GetFilterOverrides(selectionFilter.Id);graphics.SetCutBackgroundPatternColor(new Autodesk.R...
Common WordPress Issues
Error: 12345678910111213● mysqld.service - MySQL ServerLoaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)Active: failed (Result: exit-code) since Tue 2025-07-15 11:18:35 CST; 1min 30s agoDocs: man:mysqld(8)http://dev.mysql.com/doc/refman/en/using-systemd.htmlProcess: 26003 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=127)Main PID: 4124 (code=exited, status=1/FAILURE)Jul 15 11:18:35 VM-4-15-centos systemd[1]: Starting MySQL Server...Jul 1...
WordPress 常见问题
报错: 12345678910111213● mysqld.service - MySQL ServerLoaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)Active: failed (Result: exit-code) since Tue 2025-07-15 11:18:35 CST; 1min 30s agoDocs: man:mysqld(8)http://dev.mysql.com/doc/refman/en/using-systemd.htmlProcess: 26003 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=127)Main PID: 4124 (code=exited, status=1/FAILURE)Jul 15 11:18:35 VM-4-15-centos systemd[1]: Starting MySQL Server...Jul 15 1...
在Revit中实现凸包算法
ConvertHullAlgorithm (凸包算法)引用 《计算几何》-导言:凸包的例子 前言 算法的基本逻辑与理念来自于《计算几何》这本书,后面其他几章的演示也都会在Revit中实现调试,希望能够每个算法都找一个合适的实现方向在Revit中实现 所有的代码都是c#编写并在Revit中调试,因为部分接口与判定使用了Revit API,如果想单纯运行算法可以修改部分API到常用库 算法逻辑算法比较简单,主要是获取一个点集合的外围边界,通过对点与向量相比较从而获取边界区域。  算法将所有点集按照点的X值从小到大排序,排序完成后连接最左侧的点与最右侧的点可以看到会将整个子集分割为两个子集:上子集,下子集  如果找到边界则代表边界点将会包围所有的点,故边界点两两连接...
Convex Hull Algorithm Implementation in Revit
ConvertHullAlgorithm (Convex Hull Algorithm)Reference “Computational Geometry” - Introduction: An Example of Convex Hull Preface The basic logic and concept of the algorithm come from the book “Computational Geometry”. The demos of other chapters will also be implemented and debugged in Revit, hoping to find a suitable implementation direction for each algorithm in Revit. All code is written in C# and debugged in Revit. Some interfaces and judgments utilize the Revit API. If you want to run ...
Fix Far Manager 3 Display Interface Garbled Issues
Far Manager Chinese Garbled Issue The original article at the link above provides a specific method which I verified works. However, for a novice like me, it might be hard to find where to modify the options. More specific steps are given below. Click on the title area  Select Interface Setting  Modify the two values...
Fix Far Manager 3 显示配置
Far Manager中文乱码问题 原文在上面的链接,给出了具体的方式,验证可行,但是对于像我这种的新手来说可能不太好找到选项修改的位置,在下面给出更加具体的方式。 点击标题位置  1. 选择`Interface Setting`  1. 修改原文中给出的两个值,点击`OK`,`ALT+F9`保存配置,并重启 








