仅提供中文版本
点开多段轴网会发现轴网类型为MultiSegmentGrid,里面没有Locaiton可以获取,如果想要获取路径可以通过两种方式进行获取
方式一:
Revit中可以进行编辑草图模式的均可以通过删除构件收集构件ID进行获取相应路径
代码可以参照叶雄进的获取板边界文章进行获取
方式二:直接Collector收集所有的Grid类型即可,里面同样Name的轴线即为多段轴网
1 | var list = collector.OfCategory(BuiltInCategory.OST_Grids).ToList(); |
Author: Broccoli
Copyright Notice: All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Related Articles
2021-01-19
WCF Use Console to Drive Revit
Currently doing family library project, already made WPF interface but because it was WPF project at start, intermediate interaction operations need to be implemented in Revit, thinking of driving Revit through WPF thereby implementing communication between two windows. One way is generic, implemented using external event, this path is relatively easyAnother way is when reading jimmy‘s blog found a case, using WCF as connection to drive two independent programs. Regarding creating WCF program...

2021-09-14
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...

2020-05-19
使用NSIS制作revit插件安装包
@TOC 使用NSIS制作revit插件安装包下载NSIS DOWNLOADHM NSIS Addin文件==我们需要将addin文件进行单独存放==位置放在读取文件的section后就可 修改脚本文件 增加对addin文件的路径自动修改 1234567891011 Section change StrCpy $1 "<Assembly>" StrCpy $1 "$1$INSTDIR" StrCpy $1 "$1\bin\De··bug\Panel.dll</Assembly>" Push <Assembly>name.dll</Assembly> #text to be replaced Push $1 #replace with Push all #replace all occurrences Push all #replace all occurrences Push C:\ProgramData\Autodesk\Rev...
2020-01-19
2016 RevitAPI Batch Generate Multiple Components
Today I found a quite interesting class searching the API: FamilyInstanceCreationDataBy passing parameters, you can use doc.Create.NewFamilyInstances2() to generate all components at once.This class can be used for modeling or adjusting components. The method comes with two methods. .axis && .RotateAngle can save the steps of using ElementTransformUtils.RotateElement() after generating components before. It is more concise at call level than generating one by one before. The time diff...

2020-04-28
Revit Secondary Development Dockable Panel Click Button Interaction with Revit Main Window
Create Dockable WindowGithub AddressAddress ReferenceThe Building CoderCSDN Revit Secondary Development Dockable WindowRevit Secondary Development - Non-modal Window and Revit Window Focus SwitchingRain Flower Pick - Revit Secondary Development ExternalEvent Implement Non-modal FormRevit Secondary Development Entry: Chapter 9 Events Create WPF Window After adding WPF window, modify usercontrol to Page, F7 cut into background also modify to Page. Also need to referenceAutodesk.Revit.UI.IDockab...
2021-06-08
Revit PromptForFamilyInstancePlacementOptions Family Placement API
Doing family library during this period, when needed to connect with Revit at the end, hoping users can choose to download and then directly arrange components in Revit. Searching API, found PromptForFamilyInstancePlacementOptions method can be used to implement family placement. The code is relatively simple, but need to remember, since PromptForFamilyInstancePlacementOptions will create a transaction itself, so if using it, need to move this method out of transaction. code: 1234567891011121...
Announcement
欢迎访问!右上角可切换中英文。感谢您的阅读!



