当前位置:网站首页>Revit secondary development - creating elevation (phase 8)
Revit secondary development - creating elevation (phase 8)
2022-04-21 12:50:00 【A seat in Wolong City, Tsing Yi】
In this issue, we will follow the modeling steps to explain how to use secondary development to create elevation .
- Create levels .( I won't copy the first pile of templates here .)
Level ll = Level.Create(doc,10.00/304.8);
This line of code means in doc Creates one in 10 Mm elevation , The reason for dividing by 304.8 Because this language and software were invented by foreigners , Its unit is feet ,304.8 Is the conversion relationship between feet and millimeters .
( Reference books or online code write Level ll = doc.Create.NewLevel(100.0); This is also right, but 2016 Previous edition API,2016 This writing method will no longer be used after version .)
Using this method, we create the elevation we want , Now look at the effect :
We can see revit Automatically created a 10 Mm elevation , But no view was created . So we also need to create views .
2. Create view .
Level ll = Level.Create(doc,10.00/304.8);// This is the elevation created earlier
// Use the previously mentioned method of creating a collector to get all the files
FilteredElementCollector fil = new FilteredElementCollector(doc);
// Create a filter to filter out all view types
fil.OfClass(typeof(ViewFamilyType));
// Traverse each view type
foreach (ViewFamilyType vv in fil)
{
// Find a view whose view type is floor or ceiling
if (vv.ViewFamily == ViewFamily.FloorPlan || vv.ViewFamily == ViewFamily.CeilingPlan)
{
// Create this view
ViewPlan View = ViewPlan.Create(doc, vv.Id, ll.Id);
}
}
Using the above pile of code, you can create the view corresponding to the elevation , Let's see the effect :
We created both floor and ceiling views ,( In fact, these two views cannot be at the same level , Here are all listed at the same time , You can use any view type you want to create .)
Xiaobian wants to use the positive mold turning process to write articles , Something else will be interspersed in the middle , Finally, I will write some cases , The road to code is still far away , Just put Dad ~~~
( Xiaobian is a hard working dog in a design institute , The update is slow and the reply is slow , I hope you will understand .)
A clear ink book goes by , Who can find out the reason for leaving the war .
Work: Revit Secondary development , I hope to make friends with you .
版权声明
本文为[A seat in Wolong City, Tsing Yi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211247475919.html
边栏推荐
- 2022年一级注册建筑师考试建筑物理与设备复习题及答案
- Operation of simulated examination platform of test question bank for operation certificate of safety management personnel of hazardous chemical business units in 2022
- 打包的jar能正常运行,正常连接数据库。exe4j生成exe后执行到访问数据库就报错:
- 诗词学习-
- 赛事解析|乒乓球时序动作定位大赛亚军方案分享
- The 2022 language and intelligent technology competition was upgraded to launch four cutting-edge tasks of NLP
- 主从复制--03---同步数据一致性问题
- 利用Cisco配置VRRP(虚拟路由器冗余协议)
- 2022年G3锅炉水处理上岗证题目及答案
- ASM插桩之美
猜你喜欢

S TYLE N E RF: A S TYLE - BASED 3D-A WARE G ENERA - TOR FOR H IGH - RESOLUTION I MAGE S YNTHESIS

4 years of Android development 13K, completed this 1307 page Android interview full set of real problem analysis, job hopping and salary increase 15K

2022年监理工程师考试质量、投资、进度控制练习题及答案

Validation数据校验注解

利用Cisco配置VRRP(虚拟路由器冗余协议)
AES自动生成base64密钥加密解密

2022语言与智能技术竞赛再升级,推出NLP四大前沿任务

Binary tree traversal series 02 Morris traversal

斐波那契数列

Finally someone made it clear! It turns out that this is the global one-piece network technology with low delay
随机推荐
自媒体如何打造爆文,提升阅读量
高并发IO的底层原理
Introduction notes to PHP zero Foundation (11): String
Revit二次开发——创建墙体(2)(第十一期)
selenium的滑块验证码的模拟登录(猪八戒网站)
Software engineering final exam questions and answers
通过Ffmpeg把M3u8格式转换成Mp4
Long Zhi was assessed as CMMI [3]
这是一期Revit二次开发小案例(自动布置支吊架)
pytest多文件执行顺序控制
import in protocol buffer
赛事解析|乒乓球时序动作定位大赛亚军方案分享
Revit二次开发——创建墙体(1)(第十期)
2021-2022 年度广东省职业院校学生专业技能大赛
终于有人讲明白了!原来这才是全球低时延一张网技术
Pytest multi file execution sequence control
Ceph实战(一)-分布式存储介绍与原理架构概述
Go语言 反射
Revit二次开发之反编译
The course of qiniu business school allows Xiaobai to open an account and make new debts. Is it safe?