当前位置:网站首页>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);边栏推荐
- Welcome to CSDN markdown editor
- 【Azure微服务 Service Fabric 】在SF节点中开启Performance Monitor及设置抓取进程的方式
- Pre sale 179000, hengchi 5 can fire? Product power online depends on how it is sold
- Main functions of OS, Sys and random Standard Libraries
- Index summary (assault version)
- Ternary expressions, generative expressions, anonymous functions
- null == undefined
- PKPM 2020 software installation package download and installation tutorial
- Song list 11111
- [advanced MySQL] index details (I): index data page structure
猜你喜欢

客户案例|华律网,通过观测云大幅缩短故障定位时间

null == undefined

Add get disabled for RC form

Paint basic graphics with custompaint

用语雀写文章了,功能真心强大!

What if the win11u disk does not display? Solution to failure of win11 plug-in USB flash disk
Latest Android advanced interview questions summary, Android interview questions and answers

Time standard library

Win11时间怎么显示星期几?Win11怎么显示今天周几?

Overseas agent recommendation
随机推荐
Jerry's fast pairing does not support canceling pairing [article]
Solve the problem of uni in uni app Request sent a post request without response.
Where is the big data open source project, one-stop fully automated full life cycle operation and maintenance steward Chengying (background)?
The strongest installation of the twin tower model, Google is playing "antique" again?
Redis - basic use (key, string, list, set, Zset, hash, geo, bitmap, hyperloglog, transaction)
Pre sale 179000, hengchi 5 can fire? Product power online depends on how it is sold
operator
Jerry's about TWS pairing mode configuration [chapter]
Build your own website (18)
Welcome to CSDN markdown editor
Dayu200 experience officer MPPT photovoltaic power generation project dayu200, hi3861, Huawei cloud iotda
[azure microservice service fabric] the service fabric cluster hangs up because the certificate expires (the upgrade cannot be completed, and the node is unavailable)
如何选择合适的自动化测试工具?
[azure microservice service fabric] how to transfer seed nodes in the service fabric cluster
The function is really powerful!
DBSync新增对MongoDB、ES的支持
Have you ever been confused? Once a test / development programmer, ignorant gadget C bird upgrade
Kaggle-Titanic
23. Merge K ascending linked lists -c language
How to choose the appropriate automated testing tools?