在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 ) 代码实例通过document读取视图中的元素,放置多类别注释,如果需要多视图同时操作,则需要找到所有的view并将view传入获得所有的构件 1234567891011121...
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...
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...
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...
在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();
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...
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...
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...
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 ...
在Revit中实现凸包算法
ConvertHullAlgorithm (凸包算法)引用 《计算几何》-导言:凸包的例子 前言 算法的基本逻辑与理念来自于《计算几何》这本书,后面其他几章的演示也都会在Revit中实现调试,希望能够每个算法都找一个合适的实现方向在Revit中实现 所有的代码都是c#编写并在Revit中调试,因为部分接口与判定使用了Revit API,如果想单纯运行算法可以修改部分API到常用库 算法逻辑算法比较简单,主要是获取一个点集合的外围边界,通过对点与向量相比较从而获取边界区域。 算法将所有点集按照点的X值从小到大排序,排序完成后连接最左侧的点与最右侧的点可以看到会将整个子集分割为两个子集:上子集,下子集 如果找到边界则代表边界点将会包围所有的点,故边界点两两连接后将会是最大的向量,保证向量右侧没有其他的点,视为边界点 通过上面的步骤,可以创建一个遍历,获得最外侧向量并逐步向最大值位置推进,从而描绘出边界区域 在完成上子集遍历后(及点推进到了X值最大点),将顺时针继续遍历子集,此时需要将整个数组的集合按照从大到小转置,并将参照的向量Dir修改为(TheRight...
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 given in the original article, click OK, press ALT+F9 to save the configuration, and restart.
Fix Far Manager 3 显示配置
Far Manager中文乱码问题 原文在上面的链接,给出了具体的方式,验证可行,但是对于像我这种的新手来说可能不太好找到选项修改的位置,在下面给出更加具体的方式。 点击标题位置 选择Interface Setting 修改原文中给出的两个值,点击OK,ALT+F9保存配置,并重启
OOCT WPF_D3D Project Error Cannot Load Dependency
Running sample project reported error missing dll, found used this big shot, adding PATH path also cannot solve, saw no other dependencies under debug folder. Via depends tool can see OCCTProxy_D3D.dll missing dependencies, missing items in picture are all module dlls generated by OCCT so copy these dlls from ..\build\win64\vc14\bind or copy all to WPF project folder then can run.After copying to folder can create new file, can run sample project.
OOCT WPF_D3D项目报错无法加载依赖项
运行示例项目报错缺少dll,发现运用了这个大老李,通过添加PATH路径也无法解决,看到debug文件夹下面没有其他的依赖项。 通过depneds工具可以看到 OCCTProxy_D3D.dll 缺少依赖项,图中的缺项都是OCCT生成的模块dll所以讲这些dll从..\build\win64\vc14\bind 中复制或是全部复制到WPF项目的文件夹下即可运行。复制到文件夹之后可以新建文件,可以运行示例项目。
Solution to Multi-Dependency Update Issues in Revit Add-in Manager
I am using this open source project related to Add-in Manager: RevitAddInManager Project Logic The project adopts a method of loading the RevitAddinManage dll, and dynamically loads the user’s test dll within the file to achieve rapid loading and testing. Through this method, multiple programs can be attached to Revit and tested. Issue I have a test file called RevitTest. My main working files are A, A.UI, A.API… If I load a method from A into the test file and test it by attaching the Add...
Revit Add-in Manager 多重依赖无法更新的问题解决办法
我使用的是Add-in Manager 是这个开源项目 RevitAddInManager 项目逻辑 项目采取的办法是通过加载RevitAddinManage这个dll,并在文件中动态加载用户的测试dll从而达到快速加载,快速测试的目的 通过这种办法可以将多个程序附加到revit中并进行测试 问题点 我有一个测试文件叫做RevitTest,我的主要的工作文件为 A , A.UI , A.API ,,, 如果我将A的一个方法加载到测试文件中通过附着Add-in 进行测试,那么会出现 A更新之后无法依赖正确项的问题,必须重启才可以完成测试。下图可以看到多次测试会动态加载多个dll,这个是我修正之后的情况,修正之前XGZ_Tool只能依赖最早的一般,问题就出现在这里 Assembly.Load()在具体了解解决办法之前,先了解一下Assembly.Load() , 通过这个函数可以动态加载我们需要的dll也就是add-in的关键函数,Load有三个函数 Load()函数需要将dll的强名称传入进来,类似格式为System.Security.Permissions.FileIO...
DataGrip Failed to Connect to Centos MySql
First check if Mysql is running:systemctl status mysqld, if it shows not started, you need to start mysql. Check if the firewall is open, and if port 3306 is open.sudo firewall-cmd --list-allIf 3306 is not open below, then open port 3306. 12345678910111213public target: default icmp-block-inversion: no interfaces: sources: services: dhcpv6-client ssh ports: 3306/tcp protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules: sudo firewall-cmd --zone=...
DataGrip 连接 Centos MySql失败
首先检查Mysql是否运行:systemctl status mysqld , 如果显示没有启动则需要启动mysql 检查防火墙是否打开,是否打开3306的端口sudo firewall-cmd --list-all如果下面3306没有打开则打开3306端口 12345678910111213public target: default icmp-block-inversion: no interfaces: sources: services: dhcpv6-client ssh ports: 3306/tcp protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules: sudo firewall-cmd --zone=public --add-port=3306/tcp --permanent 如果添加成功则显示success 本地测试是否能够连接成功 telnet ip 3306 显示连接实现但是ping ip可以成功 后来想...










