当前位置:网站首页>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);边栏推荐
- L'enregistreur de disque dur NVR est connecté à easycvr par le Protocole GB 28181. Quelle est la raison pour laquelle l'information sur le canal de l'appareil n'est pas affichée?
- Why can't win11 display seconds? How to solve the problem that win11 time does not display seconds?
- Can I open a stock account directly online now? Is it safe?
- DBSync新增对MongoDB、ES的支持
- Vs custom template - take the custom class template as an example
- OpeGL personal notes - lights
- Application practice | the efficiency of the data warehouse system has been comprehensively improved! Data warehouse construction based on Apache Doris in Tongcheng digital Department
- Embedded development: how to choose the right RTOS for the project?
- MIT6.S081-Lab9 FS [2021Fall]
- Welcome to CSDN markdown editor
猜你喜欢
![Jerry's initiation of ear pairing, reconnection, and opening of discoverable and connectable cyclic functions [chapter]](/img/14/1c8a70102c106f4631853ed73c4d82.png)
Jerry's initiation of ear pairing, reconnection, and opening of discoverable and connectable cyclic functions [chapter]

The strongest installation of the twin tower model, Google is playing "antique" again?

【Azure微服务 Service Fabric 】因证书过期导致Service Fabric集群挂掉(升级无法完成,节点不可用)
![[JDBC Part 1] overview, get connection, CRUD](/img/53/d79f29f102c81c9b0b7b439c78603b.png)
[JDBC Part 1] overview, get connection, CRUD

使用 BlocConsumer 同时构建响应式组件和监听状态

Add get disabled for RC form

Record a garbled code during servlet learning

EasyCVR配置中心录像计划页面调整分辨率时的显示优化

How to make agile digital transformation strategy for manufacturing enterprises

What if the win11u disk does not display? Solution to failure of win11 plug-in USB flash disk
随机推荐
Get the exact offset of the element
L'enregistreur de disque dur NVR est connecté à easycvr par le Protocole GB 28181. Quelle est la raison pour laquelle l'information sur le canal de l'appareil n'est pas affichée?
Remember aximp once Use of exe tool
Matplotlib drawing interface settings
Xcode modifies the default background image of launchscreen and still displays the original image
Google SEO external chain backlinks research tool recommendation
海外代理推荐
Paint basic graphics with custompaint
Interview question 01.02 Determine whether it is character rearrangement - auxiliary array algorithm
How to quickly check whether the opening area ratio of steel mesh conforms to ipc7525
Crawler (17) - Interview (2) | crawler interview question bank
SAR image quality evaluation
Application practice | the efficiency of the data warehouse system has been comprehensively improved! Data warehouse construction based on Apache Doris in Tongcheng digital Department
强化学习-学习笔记9 | Multi-Step-TD-Target
反爬通杀神器
Redis - basic use (key, string, list, set, Zset, hash, geo, bitmap, hyperloglog, transaction)
Talk about relational database and serverless
[open source] Net ORM accessing Firebird database
Jerry's about TWS pairing mode configuration [chapter]
使用 CustomPaint 绘制基本图形