Revit 左右值编码存储分级树形结构设计
近期在进行族库管理的开发,原来的想法通过左右插值进行族库的层级管理后来模拟了一下发现对于后期新增大量的项目族库会有不少的负担,所以把这个想方法记录下来,给有需要的人吧。如果不涉及大批量的修改,可以使用这种办法,但是整个房建行业恐怕只有规范硬编码之类的能够适合。左右值比较的关系主要和下图一样详细内容可以看这个博客:左右值编码存储无限分级树形结构设计 下面的示例是,将族库遍历按照左右插值创建树形结构,主要记录的是思路,里面的一些方法是我自己创建的结构计算主要是通过 非最低层级,通过下面的文件总量与左值确定右值 最低层级,通过左值与右值的自减即可确认 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 /// 引用i值,并设置左右值 /// </summary> /// <param name="df"></param> /// <param name=&qu...
Revit Left Right Value Coding Storage Hierarchical Tree Structure Design
Recently developing family library management. Original idea was to perform hierarchical management of family library through left right interpolation. Later simulated and found that for large number of new project family libraries added later, there will be a lot of burden, so recorded this idea method for people in need.If not involving large batch modification, can use this method. But probably only standard hard coding etc. in the whole housing construction industry can be suitable.Left r...
C++ Virtual Inheritance
I used to study C++ for a while, but never found a suitable project to get familiar with it. So I am learning C++ following an open source project on github, address: github 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647/* * Virtual Inheritance * Concept: Solves the data inconsistency problem caused by different copies of the same data member inherited from different paths in memory. * Set the common base class as a virtual base class. * At this time, t...
c++ 虚继承
之前看过一段时间c++,但是一直没有找到合适的项目进行熟悉,所以在跟着github的一个开源项目学习c++,地址为:github 12345678910111213141516171819202122232425262728293031323334353637383940414243444546/* * 虚继承 * 概念:解决从不同途径继承来的同名数据成员在内存中有不同拷贝造成的数据不一致问题,将共同的基类设置为虚基类。 * 这时从不同的路径继承过来的同名数据成员在内存中就只有一个拷贝,同一个函数名也只有一个映射 * 解决问题: * 解决了二义性问题,也节省了内存,避免数据不一致问题 * * 分析: * 从程序中可以看到,C,D,E不同的继承类型为三种 public A,virtual A与virtual B,其中两次使用了virtual B * 第二次的继承将会直接引用第一次的拷贝,所以我们会看到控制台对于C,D部分的输出为B-A-A其中第二次B被省略 * 按照继承的原则首先基类,生成C-D,然后成员为A,最后为E,所以顺序为:B-A-A-C-D-A-E * */# inclu...
Connector Issues in Revit MEP
In Revit secondary development, compared to civil engineering module, there is piping system module. Connection between each MEP pipe fitting and pipe is controlled by Connector, thereby connecting the entire piping system in series.If you click pipe in LookUp, you can see it is divided into ConnectorManagement and All Refs two classes, both store Connector. People who just contacted might feel a bit messy. If querying all intersecting pipes sequentially starting from sprinkler, we can get Al...
Revit MEP中Connector连接器的问题
在Revit二次开发中,相较于土建模块多出了管道系统模块,每个机电管件与管道之间连接由Connector控制,从而将整个管道系统串联起来如果在LookUp中点开管道可以看到分为ConnectorManagement 与 All Refs两个类,之中都存储了Connector,刚接触的人可能会觉得比较乱 如果从喷淋开始依次查询所有相交管道,我们可以获取每一个Connector的All Refs进入Connector之后获取Owner然后进入相应构件的Management从而获得所有的构件连接器。简单来说All Refs存储的是外部的连接器也就是与管道相连的管件信息,Management存储的本身的Connector会根据设置数量有不同。 如果是末端关键,点击All Refs将会由两个Connector的情况其中一个指向Piping System需要在筛选中进行排除。 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859...
C# String and Hex Conversion
Reference Links:Code for conversion between Hex and String in C#Mutual conversion between C# string and HexResult:code: 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApp{ class Program { static void Main(string[] args) { string path = @"F:\mrm\pub...
c# 字符串与16进制互导
参考链接:c#实现16进制和字符串之间转换的代码C#字符串与16进制的相互转换结果:code: 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApp{ class Program { static void Main(string[] args) { string path = @"F:\mrm\publicShare\thumbnails"; var directory = Directory.GetFiles...
C++ Get all files in a folder and rename to Hex
Reference Links:https://blog.csdn.net/u012500825/article/details/41947013C++ char, string to hex (supports Chinese string conversion) 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071// ConsoleApplication1.cpp : This file contains the "main" function. Program execution begins and ends here.//#include <iostream>#include <string>#include <io.h>#include <sstream>std::string chToH...
C++ 获取文件夹下所有文件并修改为16进制名
参考连接:https://blog.csdn.net/u012500825/article/details/41947013C++ 字符、字符串转十六进制(支持中文字符串转换) 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374// ConsoleApplication1.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。//#include <iostream>#include <string>#include <io.h>#include <sstream>std::string chToHex(unsigned char ch){ const std::string hex = "0123456789ABCDEF"; std::st...
WPF Binding Image Then Not Displaying Issue
Tree binding image reference github project_ArticleAfter I bound image in TreeView found only image position but blank, modifying path and suffix name both cannot display, just like situation in picture below But I have one image can display, comparing properties of two images found need to modify newly imported image property to Copy Always then can display
WPF 绑定图片及后不显示的问题
Tree绑定图片参照的github项目_文章我在TreeView中绑定图片后发现只有图片位置但是一片空白,通过修改路径和后缀名均无法显示,就像下图中的情况 但是我有一张图片可以显示,对比两个图片的属性发现需要将新导入的图片属性修改为始终复制就可以显示了
WPF项目 程序不包含适用于入口点的静态“Main“方法
今天打开项目调试WPF项目,发现报错程序不包含适用于入口点的静态"Main"方法通过之前提交的Git历史记录发现与原来的项目.scporj的文件在App.xaml的定义上有区别,讲节点<Page>修改为<ApplicationDefinition>之后可以重新运行成功
WPF Project Program Does Not Contain Static "Main" Method Suitable for Entry Point
Today opened project to debug WPF project, found reporting error Program does not contain a static "Main" method suitable for an entry pointThrough previously committed Git history found .scporj file has difference in definition of App.xaml with original project. After modifying node <Page> to <ApplicationDefinition> can rerun successfully
Revit 二次开发 遍历相同楼层所有可以连接墙体
目的:是为了将所有没有连接到一起的墙体进行连接,满足出图要求,刚开始采用深度遍历的方式发现会报错:堆栈溢出,原因是循环层数太多导致,之后优化了一下遍历方式使用广度遍历,问题解决。下面贴出两种获取墙体并连接的方式 Element.GetgeneratingElementIds这个方法可以获得连接墙体,但是没有试验过。 关于广度遍历与深度遍历可以参照下面这个博客:https://developer.51cto.com/art/202004/614590.htm 共用结构: 1234567891011121314151617181920/// <summary> /// 返回向外侧偏移后的新Solid /// </summary> /// <param name="curves"></param> /// <param name="offset"></param> /// <param name="...
Revit Secondary Development Traverse All Connectable Walls on Same Floor
Purpose: To connect all unconnected walls together to meet drawing requirements. At first adopted depth traversal method found error: stack overflow, reason is too many loop layers. Later optimized traversal method using breadth traversal, problem solved. Below paste two ways to get walls and connect Element.GetgeneratingElementIds This method can get connected walls, but haven’t experimented yet. Regarding breadth traversal and depth traversal can refer to this blog: https://developer.51cto....
[Repost] IDEA Configuration for Algs4
https://www.cnblogs.com/junhong1995/p/7769006.html
[转] IDEA配置Algs4
https://www.cnblogs.com/junhong1995/p/7769006.html
Revit Export DWGExportSetting
I found today that Revit does not provide an export button for Export Settings. Checking API found that this piece belongs to DWGExportSetting type. If exporting, can only write interface to export by myself. Most exports of this position should concern layer modifier. Here because of its loading standard, layer modifier cannot be read. If need to transfer layers, need to transfer project standards or write interface to transfer by yourself. This can also be considered a very tasteless develo...
Revit导出DWGExportSetting
今天发现Revit中并没有提供导出导出设置的按键,查阅API发现这块属于DWGExportSetting类型,如果导出就只能自己写接口进行导出。大部分导出这个位置的应该关注的是图层修改器,这里因为他的加载标准,图层修改器是无法读取,如果需要传递图层需要传递项目标准或自己写接口进行传递,这个也算是一个很鸡肋的开发了。这里面Revit标准采用的编码并不是UTF-8而是ANSI需要注意一下,不然导入的话全部都是乱码。整个步骤并不是很麻烦,下面是全部的代码: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100using System;using System.Collections.Generic;using System.Diagnostics;using ...









