上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 35 下一页
摘要: 对话框不是模式就是无模式的。模式对话框,在可以继续操作应用程序的其他部分之前,必须被关闭(隐藏或卸载)。例如,如果一个对话框,在可以切换到其它窗 体或对话框之前要求先单击“确定”或“取消”,则它就是模式的。 一、如何调用 任何窗体(派生于基类Form的类),都可以以两种方式进行显示。 //非模式窗体 From qform=new Form(); qform.Show()... 阅读全文
posted @ 2014-03-18 11:01 马语者 阅读(19496) 评论(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 马语者 阅读(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) 编辑
摘要: 在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 马语者 阅读(960) 评论(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 马语者 阅读(1693) 评论(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 马语者 阅读(2570) 评论(0) 推荐(0) 编辑
摘要: i. Ctrl-M-O 折叠所有方法 ii. Ctrl-M-P 展开所有方法并停止大纲显示(不可以再折叠了) iii. Ctrl-M-M 折叠或展开当前方法 iv. Ctrl-M-L展开所有方法 相信做开发的没有不重视效率的。开发C#,VB的都知道,我们很依赖VS,或者说,我们很感谢VS。能够对一个IDE产生依赖,说明这个IDE确实有它的独特之处。无容置疑,VS是一个... 阅读全文
posted @ 2014-03-12 16:07 马语者 阅读(11424) 评论(0) 推荐(1) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 35 下一页