当前位置:网站首页>Revit secondary development - creating grids (phase 9)
Revit secondary development - creating grids (phase 9)
2022-04-21 12:50:00 【A seat in Wolong City, Tsing Yi】
In this issue, we will talk about how to create a grid through secondary development .
revit API Provides two kinds of grid creation , One is to create a curved grid :
Create(Document, Arc)
The other is to create a linear grid :
Create(Document, Line)
Curved grids are created in the same way as lines , Not yet , So Xiaobian mainly introduces how to create a linear grid .
The code for creating a grid is simple , Not much to say , Go straight to the code .
Grid gg = Grid.Create(doc, Line.CreateBound(new XYZ(0, 0, 0), new XYZ(0, 2000, 0)));
Explain in detail what this line of code means :
Grid.Create Is to create a grid ;
Inside the brackets are overloaded ;
Line.CreateBound Is to create two endpoints of the line ;
(new XYZ(0, 0, 0), new XYZ(0, 2000, 0)) Is the coordinates of the two endpoints ;
To name a grid, use gg.Name = "A";
Here's how to draw a whole grid ( Similarly, you should copy the template yourself ):
Grid g1 = Grid.Create(doc, Line.CreateBound(new XYZ(100, 0, 0), new XYZ(100, 2000, 0)));
g1.Name = "A";
for (int i = 200; i < 2000; i += 100)
{
g1 = Grid.Create(doc, Line.CreateBound(new XYZ(i, 0, 0), new XYZ(i, 2000, 0)));
}
Grid g2 = Grid.Create(doc, Line.CreateBound(new XYZ(0, 100, 0), new XYZ(2000, 100, 0)));
g2.Name = "1";
for (int j = 200; j < 2000; j += 100)
{
g2 = Grid.Create(doc, Line.CreateBound(new XYZ(0, j, 0), new XYZ(2000, j, 0)));
}
Here is to use two cycles to draw a whole isometric grid , And specifies the name of the first grid , After that, the grid name will change automatically .
Let's see the effect :
All right. , That's all for the basic explanation ! Finally, don't forget
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/202204211247475878.html
边栏推荐
- mysql数据库操作语句练习
- 4 years of Android development 13K, completed this 1307 page Android interview full set of real problem analysis, job hopping and salary increase 15K
- import in protocol buffer
- pytest多文件执行顺序控制
- 弹性架构内容和成本探讨-数字化架构设计(3)
- 构建QML应用程序
- 深入剖析Focal loss损失函数
- Operation of simulated examination platform of test question bank for operation certificate of safety management personnel of hazardous chemical business units in 2022
- Revit二次开发——创建墙体(1)(第十期)
- 通过Ffmpeg把M3u8格式转换成Mp4
猜你喜欢

Ceph实战(一)-分布式存储介绍与原理架构概述

53w字!阿里首推系统性能优化指南太香了,堪称性能优化最优解

Office Word 2016 中Word自带公式编辑器编辑的公式转Mathtype出现omml2mml.xsl 问题的解决方法

IPEmotion采集J1939协议信号

selenium的滑块验证码的模拟登录(猪八戒网站)

利用Cisco配置VRRP(虚拟路由器冗余协议)

自媒体如何打造爆文,提升阅读量

【源码解析】Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation

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

Event Analysis | sharing the runner up scheme of table tennis timing action positioning competition
随机推荐
2022语言与智能技术竞赛再升级,推出NLP四大前沿任务
2020年4面美团(多线程+redis
挖财帮开通的证券账户安全吗?还是在券商开通安全一些?
SM国密学习
弹性架构内容和成本探讨-数字化架构设计(3)
Revit二次开发之创建插件面板(第十五期)
Revit二次开发——创建墙体(1)(第十期)
36天突击腾讯终拿Offer! Redis、高并发
CV技术指南免费版知识星球
Revit二次开发之创建宿主元素(门窗等)(第十四期)
最长上升子序列(二)(贪心+二分)
Revit二次开发——创建和切换标记(第十六期)
2020batjz Android Senior Engineer Interview Questions - multiple choice questions collection (with answer analysis)
Flowable activiti7 countersign
Validation data validation annotation
计算一年中第几天,C语言实现
2020 meituan (multithreading + redis)
风丘科技为您提供10M以太网解决方案
selenium的滑块验证码的模拟登录(猪八戒网站)
主从复制--03---同步数据一致性问题