当前位置:网站首页>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);边栏推荐
- 怎样写一个增广矩阵到txt文件中
- 用语雀写文章了,功能真心强大!
- PKPM 2020 software installation package download and installation tutorial
- The essence of analog Servlet
- 大数据开源项目,一站式全自动化全生命周期运维管家ChengYing(承影)走向何方?
- Antd date component appears in English
- 谈谈制造企业如何制定敏捷的数字化转型策略
- 客户案例|华律网,通过观测云大幅缩短故障定位时间
- [colmap] sparse reconstruction is converted to mvsnet format input
- Solve the problem of uni in uni app Request sent a post request without response.
猜你喜欢

Add get disabled for RC form

Win11时间怎么显示星期几?Win11怎么显示今天周几?
![[azure microservice service fabric] the service fabric cluster hangs up because the certificate expires (the upgrade cannot be completed, and the node is unavailable)](/img/35/1bb21c100980eb1075dbbcb922e181.png)
[azure microservice service fabric] the service fabric cluster hangs up because the certificate expires (the upgrade cannot be completed, and the node is unavailable)
![[开源] .Net ORM 访问 Firebird 数据库](/img/a2/4eff4f0af53bf3b9839a73019a212f.png)
[开源] .Net ORM 访问 Firebird 数据库
![VTOL in Px4_ att_ Control source code analysis [supplement]](/img/7a/4ce0c939b9259faf59c52da2587693.jpg)
VTOL in Px4_ att_ Control source code analysis [supplement]

Use blocconsumer to build responsive components and monitor status at the same time

Embedded development: how to choose the right RTOS for the project?

Two methods of calling WCF service by C #

648. Word replacement

NVR hard disk video recorder is connected to easycvr through the national standard gb28181 protocol. What is the reason why the device channel information is not displayed?
随机推荐
如何选择合适的自动化测试工具?
Why can't win11 display seconds? How to solve the problem that win11 time does not display seconds?
Cv2.resize function reports an error: error: (-215:assertion failed) func= 0 in function ‘cv::hal::resize‘
使用 BlocConsumer 同时构建响应式组件和监听状态
Jerry's about TWS pairing mode configuration [chapter]
Talk about relational database and serverless
Reptile combat (VII): pictures of the king of reptiles' heroes
How polardb-x does distributed database hotspot analysis
Which financial products will yield high returns in 2022?
An in-depth understanding of fp/fn/precision/recall
Remember aximp once Use of exe tool
建立自己的网站(18)
How to choose the appropriate automated testing tools?
VTOL in Px4_ att_ Control source code analysis [supplement]
OpenGL configure assimp
The strongest installation of the twin tower model, Google is playing "antique" again?
Two methods of calling WCF service by C #
Jerry's fast pairing does not support canceling pairing [article]
EasyCVR配置中心录像计划页面调整分辨率时的显示优化
Write in front -- Talking about program development