原创 Revit中Category的獲取

開發基礎代碼 UIDocument uidoc = commandData.Application.ActiveUIDocument; Document doc = uidoc.Document; UIApplication uiapp

原创 開發所需向量基礎知識

向量的叉積 向量積,也被稱爲叉積(即交叉乘積)、外積,是一種在向量空間中向量的二元運算。與點積不同,它的運算結果是一個僞向量而不是一個標量。並且兩個向量的叉積與這兩個向量都垂直。 定義: 兩個向量a和b的叉積寫作a × b(有時也被寫成a

原创 WPF : ControlTemplate和DataTemplate的區別

http://www.cnblogs.com/mrfangzheng/archive/2009/09/21/1571418.html ControlTemplate用於描述控件本身. 使用TemplateBinding來綁定控件自身的屬性

原创 共享參數

創建txt文件路徑(string) 通過System.IO.FileStream fs = System.IO.File.Create(paraFile)建文件 通過app.SharedParametersFilename = paraF

原创 設置Revit文件預覽圖

DocumentPreviewSettings Class Contains the settings related to the saving of preview images for a given document. // G

原创 revit三維轉到俯視圖並縮放匹配選定元素

根據需要轉到特定角度的三維視圖,首先查找需要轉到三維視圖的up Direction 和Right Direction 並據此算出forwardDirection。  UIDocument uidoc = comm

原创 表達式主體定義

原文地址https://docs.microsoft.com/zh-cn/dotnet/csharp/programming-guide/statements-expressions-operators/expression-bodied

原创 Taskdialog

TaskDialog dialog = new TaskDialog("提示"); dialog.MainContent = "請選擇"; dialog.AddCommandLi

原创 二次開發獲取默認類型Id

Document GetDefaultElementTypeId Method public ElementId GetDefaultElementTypeId( ElementTypeGroup defaultTypeId )

原创 revit參數

Storagetype 描述了內部存儲參數值的類型。在Revit裏所有的參數值可以分爲5種類型:   None None represents an invalid storage type. This value should not

原创 XYZ點操作常用方法

判斷兩個向量是否平行(包含方向相反)  /// <summary> /// 判斷兩個向量是否平行,包含方向相反 /// 通過Normalize()將兩個向量單位正交化,這樣就可以通過比較這兩個單位向量的大

原创 語音朗讀

實現點擊按鈕朗讀文本框內容的目的。  添加System.Speech的引用 引用using System.Speech.Synthesis命名空間 private void button_Click(object sender, Ro

原创 將英文列表轉成中文

定義英文枚舉 enum Week { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday } 定義轉換方法

原创 利用NPOI寫入Excel

引用NPOI.Dll文件 應用命名空間 using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; 創建基礎數據 public class Student { pub

原创 關於List集合的一些基本操作

聲明需要操作的Student類以及要轉換的Person類 public class Student:IFormattable,IComparable<Student> { public int ID { get;