CAD 開發小技巧

2022-07-16 03:27:10 字數 1876 閱讀 4194

1    point2d p0,p1;

double d1 = p1.getdistanceto(p0);

2     (p1-p0).length 兩點相減得到乙個向量.再得到距離.

可以獲得該向量的長度.是否垂直/平行另個向量.

promptcorneroptions pco = new promptcorneroptions("\nselect second corner of plot area: ", first);

ppr = ed.getcorner(pco);

if (ppr.status != promptstatus.ok)

return;

point3d second = ppr.value;

5.promptforselectionending 事件.可以獲得選擇的物件

privatevoidcallback_promptforselectionending(objectsender,promptforselectionendingeventargse)

",e.selection.count));

}

catch(system.exceptionex)

}

6.獲得座標點.

tools.writemessage("computedpoint:"+e.context.computedpoint.tostring()+e.context.pointcomputed.tostring()+"\n");//包括跟蹤點

tools.writemessage("lastpoint:"+ e.context.lastpoint.tostring()+"\n");//最後一點.

tools.writemessage("rawpoint:"+e.context.rawpoint.tostring() +"\n");//游標所在的座標點

7.

#regionlinq資料

每類產品**之和

varq=

frompindb.products

grouppbyp.categoryidintog

selectnew;

8.只有當實體加入到圖形空間.才可以用ent.geometricextents屬性

9.ent.isnewobject判斷ent是乙個新對物件.也就是是否已經加入資料庫

wince C 開發 小技巧

1 我們知道,在使用windows的開發機上用c 啟動乙個外部程式的方法有很多,但這些方法用在使用wince的目標工控機上都無能為力,現在小嫚儿以開啟乙個ie為例,介紹如何在wince下使用c 來開啟乙個外部檔案 首先新增命名空間 using system.runtime.interopservic...

Web開發小技巧

獲取客戶端ip public static string getclientip if null result result string.empty return result 獲取伺服器真實路徑 public static string getserverurl region 資料快取 獲取當前...

android開發小技巧

1.anr的log一般都在 data anr 目錄下,使用這個命令即可匯出log adb pull data anr traces.txt d 意思是將手機上的traces.txt匯出到電腦的d目錄下 2.開發的過程中經常需要看某個activity的類名,一種方法是通過hierarchy viewe...