UE5 Configure VR Project Environment
The whole step borrowed article https://blog.csdn.net/weixin_44350205/article/details/119233809 But still reported error. I organize and record my own steps ConfigurationCan check ue official configuration requirements for different versions https://docs.unrealengine.com/5.0/zh-CN/android-development-requirements-for-unreal-engine/ Configure EnvironmentMy java environment is 12.0.2 satisfying requirements, because installed before so no need to reinstall here. If need to configure can fo...
UE5配置VR项目环境
整个步骤借鉴的文章 https://blog.csdn.net/weixin_44350205/article/details/119233809 但是还是依旧报错,我把我自己的步骤整理记录一下 配置可以查看ue官方对于不同版本的配置要求 https://docs.unrealengine.com/5.0/zh-CN/android-development-requirements-for-unreal-engine/ 配置环境我的java环境是12.0.2满足要求,因为是之前安装好的所以此处不需要重新安装,如果需要配置的可以按照网上环境配置2.1 配置android studio下载ide主要是为了使用ide生成项目,sutdio的下载地址: https://developer.android.google.cn/studio 2.2 下载好studio后我们需要配置sdk 这个位置主要是为了后期可以调用ue5自己的配置脚本 在ue5中配置android sdk的信息此处参照第一个链接或是官方链接进行配置 https://docs.unrealengine...
Creating Stacked PushButtons in Revit API
To make it easier to understand, it is called Compact Button, but it should actually be called Stacked Button. The keyword is StackedItems. The effect is shown below:  > https://knowledge.autodesk.com/support/revit/learn-explore/caas/CloudHelp/cloudhelp/2014/ENU/Revit/files/GUID-1547E521-59BD-4819-A989-F5A238B9F2B3-htm.html The reference link above introduces the usage of each button and provides detailed co...
Revit 二次开发 创建紧凑型pushbutton
为了好理解叫做紧凑型Button起始应该是栈式Button,关键词StackedItems,效果如下图  > https://knowledge.autodesk.com/support/revit/learn-explore/caas/CloudHelp/cloudhelp/2014/ENU/Revit/files/GUID-1547E521-59BD-4819-A989-F5A238B9F2B3-htm.html 上面的引用连接中,介绍了每个按钮的使用,并且配备有详细的代码,可以参照上面的博客进行查询练习。 因为需要到这个命令的应该是有足够数量的开发人员,所以直接上代码需要的添加即可 注意事项: 图标像素为 16*16 命名不宜过长,否则不显示,建议补充在tooltip中 12345arPanel.AddSeparator(); arPanel.AddStackedItems(crea...
Revit二次开发使用MaterialDesignThemes.Wpf
在开发Revit插件的时候很多会使用WPF创建窗口,我这里引用了MaterialDesignThemes这个组件,在这个文章里面记录一下相应的步骤和问题 使用安装 直接从nuget中搜索MaterialDesignThemes安装  2. 添加reosurces 123456789101112<Window.Resources> <ResourceDictionary> <viewmodel:ObjectConvert x:Key="ObjectConverter" ></viewmodel:ObjectConvert> <ResourceDictionary.MergedDictionaries> <materialDesign:BundledTheme...
Using MaterialDesignThemes.Wpf in Revit Secondary Development
Often when developing Revit plugins, WPF is used to create windows. Here I referenced the MaterialDesignThemes component, and I will record the corresponding steps and issues in this article. UsageInstallation Search for MaterialDesignThemes directly from nuget and install it.  2. Add resources 123456789101112<Window.Resources> <ResourceDictionary> <viewmodel:ObjectConvert x:...
Web Api Server Deployment Issue Record
Server Information: System: Windows Server 2008 R2 Error: Connection id “0HMGNTPDIIA4M“.Request id “0HMGNTPDIIA4M:00000002“:An unhandled exception was thrownManually clicking exe file under publish found can run, but port is default 5000 not website port opened by myself. Because during server deployment I directly put publish folder under website folder, causing path to become “root/publish/*”, put files inside publish folder under target path or modify path in IIS log in can solv...
Web Api 服务端发布问题记录
服务器信息: 系统: Windows Server 2008 R2 错误: Connection id “0HMGNTPDIIA4M“.Request id “0HMGNTPDIIA4M:00000002“:An unhandled exception was thrown手动点击publish下面的exe文件发现可以运行,但是端口是默认的5000不是自己开通的网站端口,因为服务器部署的时候我直接将publish文件夹放到网站文件夹下面,导致路径变成“root/publish/*”,将publish文件夹里面的文件放到目标路径下面或者在IIS修改路径登录即可解决。 下面几篇博客是解决这类问题的博客,如果我的情况不符合可以参照下方的连接 Connection id “0HMGNTPDIIA4M“.Request id “0HMGNTPDIIA4M:00000001“:An unhandled exception was thrown Ocelot.Authorization.Middleware.AuthorizationMiddleware[0] ...
创建链接模型标注
创建链接模型标注创建Floor等有实体形状的标注今天在回答Revit API Forum的问题的时候发现一个问题,如何获取链接模型的reference从而实现标注Reference to Grid and Level from link,我便使用CreateLinkReference(doc)这个方法直接获取,结果创建dimension失败报错有无效的reference,后来debug直接获取手动创建的link reference成功标注,觉得是获取的reference的问题,后台查阅refernce的strign字符串发现不一致  后来看到这篇文章[Revit处理链接文件标注Reference](https://blog.csdn.net/qq_40430656/article/details/122101018),修改后创建dimension成功,应该是转换的refernce-stable出现问题所以直接获取...
Creating Dimensions for Linked Models in Revit
Creating Dimensions for Linked ModelsCreating Dimensions for Elements with Solid Geometry like FloorsToday, while answering a question on the Revit API Forum about how to get the reference of a linked model to implement dimensioning Reference to Grid and Level from link, I used the CreateLinkReference(doc) method to get it directly, but the dimension creation failed.The error reported an invalid reference. Later, I debugged and successfully dimensioned using a manually created link reference,...
Revit 二次开发 未能加载文件或程序集“Microsoft.Xaml.Behaviors”或它的某一个依赖项
写了几个WPF界面,在addinmangager时没有发现问题,当编到一个addin文件中打包时,报错未能加载文件或程序集“Microsoft.Xaml.Behaviors, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项 修改多次未果,后来想起来Revit无法加载强签名的dll文件,将其更换为已经停止维护的包System.Windows.Interactivity打包后能够正常运行。 如果我们使用nuget搜索interactivity.dll的包时会提示有新的包可供下载,如果使用这个包进行Revit二次开发应该使用此停止维护更新的dll 
Revit Secondary Development Error Loading Microsoft.Xaml.Behaviors
I wrote several WPF interfaces and found no problems when using AddinManager. However, when compiled into an addin file and packaged, it reported an error:Could not load file or assembly “Microsoft.Xaml.Behaviors, PublicKeyToken=b03f5f7f11d50a3a” or one of its dependencies After modifying it many times without success, I remembered that Revit cannot load strong-named dll files, so I replaced it with a package that has stopped maintenance:System.Windows.InteractivityIt runs normally after pack...
Creating Void Solids for Cutting in Revit Secondary Development
For specific API, please refer to the official documentation. Here is the keyword for cutting Void. OverviewApplication ScenariosIn actual projects, if you want to make a family to cut a component, you need to create a void extrusion, and then execute the cut command to cut off the model component we want to cut.It is widely used in quantity calculation to execute join/cut commands, or connection order in actual engineering.Or in projects with high precision requirements or where the own...
Revit二次开发 创建空心模型并与指定构件剪切
具体API可以查阅官方文档,这里提供剪切的关键词Void 总述应用场景在实际项目中,想要做一个族剪切构件,需要创建一个空心拉伸,然后执行剪切命令剪切掉我们希望剪切的模型构件在算量的时候应用比较广执行连接/剪切命令,或者实际工程中的连接顺序或是在精度要求高或者业主拖着不给结算的项目中也会出现一些稀奇古怪的要求,比如我遇到这个结构梁剪切建筑墙 基本逻辑 首先将结构链接模型中的结构梁的Solid取出 获取所有墙,与上一步获取的结构梁Solid做交集,取出相交Solid 第二步会产生两个方向 [ ] 每个InsertSolid都作为一个族生成 [x] 合并成一个大的InsetSolid几何,在一个族中执行相应的名称分别创建 生成空心形体之后(我这里使用的空心拉伸)修改族参数(加载时剪切的空心)到族中,这一步网络上的都是手动改无法契合这个功能的要求,所以下面我会提供一段代码 放置到指定位置执行构件间剪切的操作 完成 创建空心族创建族文件这一步代替的实际操作就是 File ->New File -> Category的操作,我们获取到族文档才能在文档中绘制形状和修改...
.net core application error The required library hostfxr.dll could not be found
Programs generated by .Net Core and Framework. .Net Core needs to be applied in the running environment. Sending it directly to others will cause an error. 12345678:\Program Files (x86)\***>.\copyfiles.exeA fatal error occurred. The required library hostfxr.dll could not be found.If this is a self-contained application, that library should exist in [C:\Program Files (x86)\BiMass\].If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dot...
.net core application报错The required library hostfxr.dll could not be found.
.Net Core和Framework生成的程序,.Net Core需要再运行环境中应用,直接扔给其他人会报错 12345678:\Program Files (x86)\***>.\copyfiles.exeA fatal error occurred. The required library hostfxr.dll could not be found.If this is a self-contained application, that library should exist in [C:\Program Files (x86)\BiMass\].If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the run...
Creating Revit Installer with Inno Setup
Previously, I packaged files through NSIS, and later I found Inno Setup. After using it, I found that Inno is slightly better than NSIS personally, and the entire operation interface is much simpler than NSIS. There is a localization version that can be added, but I use the English original version here. Wizard Settings Create a new file wizard after installation File-> New  2. Click Next to enter the set...
Inno Setup 创建Revit安装包
之前通过NSIS打包文件后来发现Inno Setup,使用了一下发现相较于NSIS个人感觉Inno稍微好一点,整个操作界面会比NSIS要简洁许多,有汉化版可以添加我这里用的是英文原版 向导设置 安装后创建新的文件向导 File-> New  2. 点击Next进入设置界面  **因为打包的安装包大部分是放在指定的文件夹中所以选择文件夹**  3. 因为Revit插件是基于Reivt二次开发的插件所以没有启动项勾选下面的即可,如果有其他的文件也可以,这个地方我没有尝试加入文件夹,后续的文件夹我直接再脚本中新增 ![在这...
Inno Setup External Program Launch Error with Spaces in Path
When the installation package completes the installation, it can start an external program to copy the Revit Addin file to the corresponding version file location. However, I use 12[Run]Filename: "{app}\CopyFiles.exe" ;Description:"修改文件" ; Parameters:{app}; StatusMsg: "正在配置信息"; Flags: runhidden If the correct installation path selected by the user is C:\Program Files (x86) default path, passing the string will automatically split into an arra...
Inno-Setup 读取带空格路径导致无法启动外部程序
安装包完成安装时可以启动外部程序将Revit的Addin文件复制到相应的版本文件位置中,但是我使用 12[Run]Filename: "{app}\CopyFiles.exe" ;Description:"修改文件" ; Parameters:{app}; StatusMsg: "正在配置信息"; Flags: runhidden 如果用户安装选择的C:\Program Files (x86)默认路径将会导致传入的字符串自动分割为数组导致程序运行错误 去stackflow提问,找到解决方案,下面把解决方案和相应连接放到下方有类似情况的可以参照下面的连接解决。因为Pascal语句中””代表’ , 来源:pascal中的双引号为什要打6个单引号 所以需要将上面的语句修改为 12[Run]Filename: "{app}\CopyFiles.exe" ;Description:"修改文件" ; Parameters:"...











