上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 35 下一页
摘要: 本例只要演示Revit的类过滤器的用法,在对话框中显示DesignOption元素。 #region Namespacesusing System;using System.Collections;using System.Collections.Generic;using System.Diagnostics;using Autodesk.Revit.ApplicationService... 阅读全文
posted @ 2014-03-18 14:27 马语者 阅读(990) 评论(0) 推荐(1)
摘要: 对话框不是模式就是无模式的。模式对话框,在可以继续操作应用程序的其他部分之前,必须被关闭(隐藏或卸载)。例如,如果一个对话框,在可以切换到其它窗 体或对话框之前要求先单击“确定”或“取消”,则它就是模式的。 一、如何调用 任何窗体(派生于基类Form的类),都可以以两种方式进行显示。 //非模式窗体 From qform=new Form(); qform.Show()... 阅读全文
posted @ 2014-03-18 11:01 马语者 阅读(19574) 评论(2) 推荐(5)
摘要: 在本例中,通过命令可以删除选中的元素。 需要注意的是要在代码中加入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 马语者 阅读(1831) 评论(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 马语者 阅读(868) 评论(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 马语者 阅读(1333) 评论(0) 推荐(1)
摘要: 首先我看看 IEnumerable: // 摘要: // 公开枚举器,该枚举器支持在指定类型的集合上进行简单迭代。 // // 类型参数: // T: // 要枚举的对象的类型。 [TypeDependency("System.SZArrayHelper")] public interface IEnumerable : IEnu... 阅读全文
posted @ 2014-03-17 14:50 马语者 阅读(6035) 评论(3) 推荐(6)
摘要: 在Revit程序中注册文件操作事件,保存新建或打开文件的信息。当保存时,如果当前文件内容和之前的一致时,则弹出对话框提示并取消保存。对话框中有一个功能链接,点击可打开插件所在目录。 #region Namespacesusing System;using System.Collections.Generic;using System.IO;using Autodesk.Revit.Appl... 阅读全文
posted @ 2014-03-17 11:30 马语者 阅读(1780) 评论(0) 推荐(0)
摘要: 在Revit打开文件时,修改文件信息。并记录状态,存到log文件中。 #region Namespacesusing System;using System.Collections.Generic;using System.Diagnostics;using System.IO;using Autodesk.Revit.ApplicationServices;using Autodesk.... 阅读全文
posted @ 2014-03-14 16:25 马语者 阅读(974) 评论(0) 推荐(0)
摘要: 该示例中,在Revit启动时添加打印事件,在打印时向模型添加水印,打印完成后删除该水印。 #region Namespacesusing System;using System.Collections.Generic;using Autodesk.Revit.ApplicationServices;using Autodesk.Revit.Attributes;using Autod... 阅读全文
posted @ 2014-03-14 15:12 马语者 阅读(1717) 评论(0) 推荐(0)
摘要: 下面介绍一个在Revit启动和关闭时调用外部程序的例子。 Revit调用的dll主程序: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Autodesk;using Autodesk.Revit;... 阅读全文
posted @ 2014-03-12 16:18 马语者 阅读(2606) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 35 下一页