摘要: 在本例中,通过命令可以删除选中的元素。 需要注意的是要在代码中加入Transaction,否则的话会出现Modifying is forbidden because the document has no open transaction的错误。 #region Namespacesusing System;using System.Collections;using Syste... 阅读全文
posted @ 2014-03-17 17:45 马语者 阅读(1806) 评论(0) 推荐(0) 编辑
摘要: 在本例中,创建一个命令,实现删除所选中的尺寸标注。 #region Namespacesusing System;using System.Collections.Generic;using System.Diagnostics;using Autodesk.Revit.ApplicationServices;using Autodesk.Revit.Attributes;using Au... 阅读全文
posted @ 2014-03-17 17:01 马语者 阅读(855) 评论(0) 推荐(0) 编辑
摘要: 在本示例中,程序监控Revit打开文件事件,并在创建的窗体中更新文件信息。 #region Namespacesusing System;using System.Collections.Generic;using System.Data;using Autodesk.Revit.ApplicationServices;using Autodesk.Revit.Attribute... 阅读全文
posted @ 2014-03-17 16:21 马语者 阅读(1314) 评论(0) 推荐(1) 编辑
摘要: 首先我看看 IEnumerable: // 摘要: // 公开枚举器,该枚举器支持在指定类型的集合上进行简单迭代。 // // 类型参数: // T: // 要枚举的对象的类型。 [TypeDependency("System.SZArrayHelper")] public interface IEnumerable : IEnu... 阅读全文
posted @ 2014-03-17 14:50 马语者 阅读(6018) 评论(3) 推荐(6) 编辑
摘要: 在Revit程序中注册文件操作事件,保存新建或打开文件的信息。当保存时,如果当前文件内容和之前的一致时,则弹出对话框提示并取消保存。对话框中有一个功能链接,点击可打开插件所在目录。 #region Namespacesusing System;using System.Collections.Generic;using System.IO;using Autodesk.Revit.Appl... 阅读全文
posted @ 2014-03-17 11:30 马语者 阅读(1756) 评论(0) 推荐(0) 编辑