Revit二次开发之技能篇(二) |
您所在的位置:网站首页 › 轴网尺寸标注 › Revit二次开发之技能篇(二) |
在利用revit出图时,避免不了要对轴网进行标注,下面分享一下轴网尺寸标注的一些开发经验: 轴网尺寸标注: 首先要获取到尺寸标注的引用,将引用添加到引用集合中,关键代码如下: ReferenceArray array = new ReferenceArray(); array.Append(new Reference(grid));然后就是获取到需要尺寸标注的位置,在轴网的Curve上获取点,距离起始点一定距离的方法代码如下: public static XYZ getStartPoint(Line line, double length) { XYZ start = line.GetEndPoint(0); XYZ dir = line.Direction; XYZ tempone = start + length * dir; return tempone; }距离终止点一定距离的方法代码类似: public static XYZ getEndPoint(Line line, double length) { XYZ end = line.GetEndPoint(1); XYZ dir = line.Direction; XYZ temptwo = end - length * dir; return te |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |