Solutions for Vertical Stair Dimensions in Revit API
Final ResultsThe results still need to be supplemented. Currently only the stairs part is completed and still needs: Linked dimensioning for outer walls Considering the case of forward split specialty modeling, linked models need to be processed User custom selection of vertical dimension position Dimensions text avoiding stair runs Selection of level and dimension styles Align Vertical Dimension PositionRevit Secondary Development Automatically Generate Section Stair Dimensions Stair Arch...
关于Revit中楼梯竖向标注的问题记录及生成方式的解决方案
最终成果成果还需要补充,目前只完成了楼梯部分还需要 外侧墙体做联动标注 考虑到正向中分专业建模的情况还需要对链接模型进行处理 用户自定义选取竖向标注位置 做尺寸标注字体避开梯段 标高与尺寸标注样式的选择问题 对齐竖向标注位置Revit二次开发 自动生成剖面楼梯标注 楼梯架构楼梯的开发首先需要分清这几个名称方便后期调用 楼梯 Stairs梯段 StairsRun踢面 StairsRiser踏板 Tread 楼梯标注问题标注需要获取Reference及楼梯平台或是梯段的横向面以及竖向面,而楼梯分为上面几个部分,每个都有单独的Solid可以拾取,我的问题也发生在这个位置,通过单独拾取Geometry返回的Type()是ElementType,并不是Stairs相关的类,所以通过单独选取获得的Reference是错误的,猜测单独获取的Solid.Reference是编辑楼梯中的分类,所以出现不报错有ID但无法显示的现象,如果有人需要做楼梯自动标注的话,我这里将我的思路写出来供大家参考。 楼梯标注步骤 获取楼梯Geometry 获取GeometryInstance 通过Instanc...
Revit Secondary Development ManageMC3.0 Reference Conflict
When generating project found this warning but does not affect normal operation of program. Searched function of this dll found it is a link library that only appears in Revit. Checked referenced dll file myself found adwindows.dll file referenced 2019 caused version conflict. Problem is not big but still recorded to prevent careless mistake again.
Revit 二次开发 ManageMC3.0 引用冲突
生成项目是发现这个警告但是不影响程序正常运行,搜索这个dll的作用发现是在Revit中才会出现的链接库,查看自己引用的dll文件发现adwindows.dll文件引用的2019导致版本冲突,问题不大但还是记录下来,防止再次粗心出错。
Text Offset Issue When Reading CAD Text Info in Teigha Development
Today, when reading CAD text, I found that the text was offset. Repeated testing found that it was not a code problem. During the lunch break, I remembered that the text in the CAD drawing might have certain problems because the designer used a plug-in, so I opened the CAD and found that the gap between the text coordinate point and the actual position was exactly the generation deviation. The picture below shows the coordinate information of the CAD text.I checked the text function of CAD an...
Teigha开发读取CAD文字信息出现偏移
今天读取cad文字发现文字出现偏移,反复测试发现不是代码的问题,午休时想起来cad图纸中的文字因为设计师使用插件会出现一定的问题,所以打开cad发现文字坐标点与实际位置差距正好是生成偏差,下面的图片就是cad文字的坐标信息。看了一下cad的text函数,发现也没有能够直接取到位置的函数,但是可以使用方法AlignmentPoint,这种办法可以生成相应的文字但是会出现一定的偏差,因为涉及左对齐与右对齐,可能文字的起始点在字体的右侧~~~~~。 发现这个问题后我对翻模的精度有了更深刻的理解,但是由于目前设计师制图习惯的不同通过扩大适配性解决问题很难做到,最好的办法还是让设计按照标准的办法处理图纸或者制图才能增强图纸的匹配性。
QT Word wdmain.chm [24632]
昨天使用QT在word中插入图片,发现报错,查了一圈都说是路径问题,于是在qDebug中打印文件路径发现没有错误路径,之后进入debug发现是使用QString.Split()方法分割数据库字符串会出现空字符,没想到因为自己的一时偷懒浪费了将近一天的时间,因为我用的QT Creator控制台错误打印全是????,所以下面贴一下外网的完全解释,代码:24632 出现这种需要检查路径 1com_error: (-2147352567, ‘An exception occurred.’, (0, ‘Microsoft Word’, 'This is not a valid file name.\nTry one or more of the following:\n* Check the path to confirm its typed correctly.\n * Please select a file from the list of files and folders. ‘,’ wdmain11.chm ', 24632, -2146823136), No...
QT Word wdmain.chm [24632]
Yesterday, when using QT to insert a picture in word, I found an error. I checked around and said it was a path problem. So I printed the file path in qDebug and found no error path. Then I entered debug and found that splitting the database string using QString.Split() method would report empty character. Unexpectedly, because of my laziness, I wasted nearly a day. Because the console error printing of QT Creator I use is all ????, so below I paste the complete explanation from foreign netwo...
QT Copy Table Duplicate Existing Table in Document
Refer to: Interface for word operation, I studied corresponding api against blogger's code in early stage QT operate Word, insert table Use Qt to operate Word document Result Copy the table in the picture to the end of the document I wanted to implement a requirement today, copying the table in the word template. Searching major engines mostly modify internal properties of table or value assignment operations, no requirement to copy a table as a whole.Before starting, should understan...
QT Copy Table 复制文档内已有表格
参照: word操作的接口,我前期是对照博主的代码对应api学习的 QT操作Word,插入表格 用Qt操作Word文档 成果复制图中的表格到文档末尾 今天想实现一个需求,复制word模板内的表格,搜索各大引擎大部分是修改表格内部属性或是取值赋值之类的操作,没有整体复制一个表格的需求。在开始之前应该先了解QT 中 QAxObjext 方法中 querySubObject与dynamicCall,通俗点来说前者是调用方法或者调用属性,因为时间太长相关知识我也是囫囵吞枣,理解不太清楚。操作word需要这个函数调用COM API的函数,相关的函数我是查找的Microsoft,因为这个的调用是从Microsoft.Office.Interop.Word.dll出来的,像我一样的可以直接搜c#代码,然后稍微变化一下即可。 下面进入正题,复制表格需要使用Copy() 与Paste()两个函数,就像我们操作word表格时的复制粘贴一样,ps:这一步我没有添加图片,所以没有发现什么问题 复制表格 12345678910111213QAxObject* table = tables-&g...
C# Writing Data to Word via Template
Project interface created based on reference download link: Method to automatically create Word document via template in C#, but the resource is a txt file, need to type the code manually, considered as practice.Before starting, we need to install Microsoft.Office.Interop.Word from NuGet. Below is the code needed, just copy it directly. It is slightly different from using NPOI. 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626...
C# 根据模板将数据写入word
参照的下载链接创建的项目接口: C#实现通过模板自动创建Word文档的方法,但是资源是一个txt文件,需要重新手打代码,不过也算是练习了。在开始之前,我们需要先从nuget安装Microsoft.Office.Interop.Word,下面是代码需要的直接复制就可以,用起来和NPOI还是稍微有些不同。 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151...
QT+ CLion + Revit Issues Summary
Because I always wanted to implement the QT+CLion+Revit development path, I started learning QT and C++ from scratch. Here I record the problems encountered in QT and subsequent issues. If the development cycle is insufficient, it is estimated that I will burn the midnight oil for one or two weeks to get it out, and updates may stop at any time. The current idea is to create a dll with C++, write the QT interface in the dll, and then use the C++ Revit API interface to implement the entire ste...
QT+ CLion + Revit 问题汇总
ui因为一直想实现QT+CLion+Revit的开发路径,所以从头开始学习QT与C++,在这里记录一下QT遇到的问题及后续的问题。如果开发周期不足估计会用一两周爆肝出来,随时会断更。 目前的思路是C++创建dll,在dll里面编写QT界面,之后用C++ Revit 的API接口实现整个步骤。中间需要用到sqlite3的数据库组件,目前就想到这么多。现在已经实现c++读取sqlite3并完成数据接口。 由于项目进度,之前为了实现cpp+QT耽误了太多时间,所以国庆肝了三天完成整个程序,能够将整个数据库的结构模型创建在revit中,在思路已经清晰的情况下,写起来速度确实快了很多,用完cpp再用c#发现c#的继承还挺好用的,测试一下整个项目之后再继续修复这个项目。下面是所有楼板的成果,21层的框架结构预估时间在十分钟以内可以完成,我是分块测试没有集中测试,明天去公司测试一下。 @[toc] 2021/09/14SQLite3带有中文路径的字符串转码12345678910111213141516171819202122232425262728293031323334...
error LNK2001 unresolved external symbol "public virtual void __thiscall
I created a factory pattern today, and defined two inherited functions in the middle, but I didn’t write content in the main function, directly writing the algorithm in the inherited function. As a result, the error error LNK2001: unresolved external symbol "public: virtual void __thiscall was reported. Various search engines could not solve the error. Finally, I thought it should be an error caused by the undefined function in the parent function. The problem was solved after adding the...
error LNK2001 无法解析的外部符号 “public virtual void __thiscall
今天创建了一个工厂模式,中间定义了两个继承函数,但是在主函数中我没有写内容,直接在继承函数中写的算法,结果报错error LNK2001: 无法解析的外部符号 "public: virtual void __thiscall ,各种搜索引擎也没有解决错误,最后觉得应该是父函数中函数未定义造成的错误,加上函数定义之后解决问题。 这个是很低级的错误,估计只有像我这种直接c++写代码的才会出现的错误,记录一下当做提醒,防止以后再犯相同的错误。 code: 123456789101112131415161718192021222324252627library.hclass rElement{public: virtual void getValue(sqlite3_stmt* stmt);private: virtual void setMapValue();protected: map<string , int > sql_map_str;};class beamElement:public rElement{pu...
CLion Debugger process finished with exit code -1073741819
An error occurred while reading sqlite3 data. After ruling out code issues, I felt the problem was with the toolchain, so I changed the Debug Setting from QT-MINGW to MINGW, but it still reported an error. Later, I found a reply in the jetbrains website solutions stating it was a MinGW bug, which was resolved after changing to vs debugger. Original address:Debugger process finished with exit code -1073741819 (0xC0000005)
CLion Debugger process finished with exit code -1073741819
读取sqlite3数据时报错,排除代码问题后感觉实在toolbain上,于是修改Debug Setting从QT-MINGW到MINGW还是报错,后来在jetbrains的网站解决方案中发现回复是MinGW的bug更换vs debugger后解决。 原文地址:Debugger process finished with exit code -1073741819 (0xC0000005)
Method to Insert Multiple Images Consecutively in NPOI, and Partial Style Code
Because the project requirement needs to import two images in the same cell, relying on the methods of the following two linksNPOI export multiple images to Excelc# Use NPOI to Excel Application 3 (Insert Picture)The main body of the code above is the same, but inserting multiple images needs to be in the same patriarch. The blog post mentioned above mentioned that for loop cannot be used, so I created two fixed image paths directly for the first time and found that the creation failed. Then ...
NPOI 连续插入多张图片的办法,及部分样式的代码
因为项目要求需要在同一个单元格导入两张图片,依据了下面两个链接的办法NPOI导出多张图片到Excelc# 使用NPOI向Excel中的应用三(插入图片 )上面代码的主体是一样的,只不过插入多张图片需要在同一个patriarch中,上面博文提到过不能使用for循环,所以我第一次直接将固定的两个图片路径创建,发现创建失败,于是把他放到for循环里面发现可以创建,或许是一个bug又或是我参数赋值错误。 这是主要的代码,我采用for循环创建,一起创建可以参照博客2的内容。但是还要依据一个Sheet只能有一个patriarch,在循环上就新建一个备用 12345byte[] bytes = File.ReadAllBytes(rePath); int pictureIdx = _workbook.AddPicture(bytes, PictureType.JPEG); HSSFClientAnchor anchor = new HSSFClientAnchor(0 +...








