当前位置:网站首页>Revit secondary development - operation family documents
Revit secondary development - operation family documents
2022-07-07 22:22:00 【Hey, hey, hey, hey, hey】
note
// Open the family document through the family file path
Document fDoc = doc.Application.OpenDocumentFile(@"d:\xxx.rfa");
// Open the family document directly from the project
Document fDoc = doc.EditFamily(family);
// Get the family document FamilyManager
FamilyManager fm = fDoc.FamilyManager;
// Switch family types
using(Transaction trans = new Transaction(fDoc,"changeType"))
{
trans.Start();
foreach(FamilyType ft in fm.Types)
{
if(ft.Name == " type 2")
{
fm.CurrentType = ft;
break;
}
}
}
// Get family parameters
FamilyParameter fParameter = fm.get_Parameter(" Parameter name ");
// Get parameter value
double fValue = fm.CurrentType.AsDouble(fParameter).Value;
// Get parameter formula
string formula = fParameter.Formula;
// The modification should be in the transaction
// Modify parameter value
fm.Set(fParameter,10.5);
// Modify parameter formula
fm.Set(fParameter," Long * wide ");
// Add parameter
fm.AddParameter(" Custom parameters ",BuiltInParameterGroup.PG_GENERAL,ParameterType.Integer,true);边栏推荐
- Why can't win11 display seconds? How to solve the problem that win11 time does not display seconds?
- [azure microservice service fabric] the service fabric cluster hangs up because the certificate expires (the upgrade cannot be completed, and the node is unavailable)
- SAR image quality evaluation
- Oracle advanced (VI) Oracle expdp/impdp details
- 客户案例|华律网,通过观测云大幅缩短故障定位时间
- Ant destination multiple selection
- What is the difference between the three values of null Nan undefined in JS
- OpenGL job coordinate system
- 如何选择合适的自动化测试工具?
- How polardb-x does distributed database hotspot analysis
猜你喜欢

Antd date component appears in English

operator

Display optimization when the resolution of easycvr configuration center video recording plan page is adjusted

#DAYU200体验官#MPPT光伏发电项目 DAYU200、Hi3861、华为云IotDA

Pdf document signature Guide

为什么Win11不能显示秒数?Win11时间不显示秒怎么解决?

使用 BlocConsumer 同时构建响应式组件和监听状态
![[JDBC Part 1] overview, get connection, CRUD](/img/53/d79f29f102c81c9b0b7b439c78603b.png)
[JDBC Part 1] overview, get connection, CRUD

Win11U盘不显示怎么办?Win11插U盘没反应的解决方法

Index summary (assault version)
随机推荐
Jerry's about TWS channel configuration [chapter]
[advanced MySQL] index details (I): index data page structure
OpenGL configuration vs2019
What if the win11u disk does not display? Solution to failure of win11 plug-in USB flash disk
Welcome to CSDN markdown editor
ByteDance senior engineer interview, easy to get started, fluent
Jerry's fast pairing does not support canceling pairing [article]
Overseas agent recommendation
PDF文档签名指南
Remove the default background color of chrome input input box
How does win11 time display the day of the week? How does win11 display the day of the week today?
Matplotlib drawing interface settings
DNS series (I): why does the updated DNS record not take effect?
[open source] Net ORM accessing Firebird database
Firefox browser installation impression notes clipping
Interview question 01.02 Determine whether it is character rearrangement - auxiliary array algorithm
双塔模型的最强出装,谷歌又开始玩起“老古董”了?
嵌入式开发:如何为项目选择合适的RTOS?
NVR硬盤錄像機通過國標GB28181協議接入EasyCVR,設備通道信息不顯示是什麼原因?
OpenGL configure assimp