(princ "\n以視窗方式求得檔案名稱: zz")
(defun c:zz ( / ffn fftxt)
(setq ffn (getfiled "寫出檔案" "" "csv" 1))
(if ffn
(progn
(print (strcat "寫出檔案名稱: " ffn))
(setq fftxt (strcat (substr ffn 1 (- (strlen ffn) 4)) ".txt"))
(print (strcat "更改檔案(TXT)名稱: " fftxt))
)(princ "\n使用者取消!!!"))
(princ))
;輸出結果:
;"寫出檔案名稱: D:\\My Documents\\Autodesk\\97195台中工業區寬頻管道\\輸出檔\\xxx.csv"
;"更改檔案(TXT)名稱: D:\\My Documents\\Autodesk\\97195台中工業區寬頻管道\\輸出檔\\xxx.txt"
2008年10月22日 星期三
2008年10月20日 星期一
使用VBA建立一文字檔及讀取一文字檔
'使用VBA建立一文字檔
Private Sub CommandButton2_Click()
Dim otfile As String
otfile = "d:\test.csv"
Open otfile For Output As #1
'寫出資料
Print #1, "第一行"
Close #1
MsgBox "完成"
End Sub
'使用VBA讀取一文字檔
Sub in1()
Dim infile As String
Dim str1 As String
infile = "d:\test.csv"
Open infile For Input As #1
Do While Not EOF(1)
Line Input #1, str1
Loop
MsgBox str1
Close #1
End Sub
'以上程式可以執行在 MS Office Excel
Private Sub CommandButton2_Click()
Dim otfile As String
otfile = "d:\test.csv"
Open otfile For Output As #1
'寫出資料
Print #1, "第一行"
Close #1
MsgBox "完成"
End Sub
'使用VBA讀取一文字檔
Sub in1()
Dim infile As String
Dim str1 As String
infile = "d:\test.csv"
Open infile For Input As #1
Do While Not EOF(1)
Line Input #1, str1
Loop
MsgBox str1
Close #1
End Sub
'以上程式可以執行在 MS Office Excel
2008年10月1日 星期三
2008年9月25日 星期四
2008年9月22日 星期一
比Google Docs還要強的網路文書處理軟體
http://www.zoho.com/
不止是基本的文件,Zoho服務有:
Zoho Sheet 線上試算表服務、Zoho Meeting Web會議、Zoho Show 線上演示文檔工具、Zoho Invoice 線上發貨單、Zoho Writer 線上文字處理器、Zoho Notebook 線上備忘錄處理器、Zoho Creator 線上web應用程式創建器、Zoho Projects 專案管理、Zoho Planner 線上組織工具、Zoho Wiki 線上Wiki及其公開,私有&群組原則、Zoho Chat 即時消息和組聊天工具;
一整個辦公室應用都上網了;去看看吧!!!
PS:使用Google帳號就可以登入使用。
不止是基本的文件,Zoho服務有:
Zoho Sheet 線上試算表服務、Zoho Meeting Web會議、Zoho Show 線上演示文檔工具、Zoho Invoice 線上發貨單、Zoho Writer 線上文字處理器、Zoho Notebook 線上備忘錄處理器、Zoho Creator 線上web應用程式創建器、Zoho Projects 專案管理、Zoho Planner 線上組織工具、Zoho Wiki 線上Wiki及其公開,私有&群組原則、Zoho Chat 即時消息和組聊天工具;
一整個辦公室應用都上網了;去看看吧!!!
PS:使用Google帳號就可以登入使用。
2008年9月20日 星期六
autocad載入3支autolisp程式並且執行
如下程式碼,可以存在一a.lsp中以
(vl-load-all"C:/ahorng/layer/a.LSP")
指令載入,載入後程式會立即執行,其中b.LSP有一程式blay,而c.LSP有一程式clay都會執行。
;a.lsp程式內容
(vl-load-all"C:/ahorng/layer/b.LSP")
(c:blay)
(vl-load-all"C:/ahorng/layer/c.LSP")
(c:clay)
(vl-load-all"C:/ahorng/layer/a.LSP")
指令載入,載入後程式會立即執行,其中b.LSP有一程式blay,而c.LSP有一程式clay都會執行。
;a.lsp程式內容
(vl-load-all"C:/ahorng/layer/b.LSP")
(c:blay)
(vl-load-all"C:/ahorng/layer/c.LSP")
(c:clay)
2008年9月19日 星期五
在AutoCAD2009中無法打開2004版檔案
在AutoCAD2009中無法打開2004版檔案,可以使用修復「檔案/圖檔公用程式/修復」方式開啟;
原因解決方式:
使用AutoCAD 2008或DWG TrueView,以AutoCAD 2007格式保存文件。
使用AutoCAD 2008打開圖檔,將3DCONVERSIONMODE設置為0,然後以AutoCAD 2004/2000文件格式另存檔案。
參考網站:
英文說明:
http://usa.autodesk.com/adsk/servlet/ps/item?siteID=123112&id=11328222&linkID=9240617
簡體說明:
http://www.autodesk.com.cn/adsk/servlet/item?siteID=1170359&id=11623015
原因解決方式:
使用AutoCAD 2008或DWG TrueView,以AutoCAD 2007格式保存文件。
使用AutoCAD 2008打開圖檔,將3DCONVERSIONMODE設置為0,然後以AutoCAD 2004/2000文件格式另存檔案。
參考網站:
英文說明:
http://usa.autodesk.com/adsk/servlet/ps/item?siteID=123112&id=11328222&linkID=9240617
簡體說明:
http://www.autodesk.com.cn/adsk/servlet/item?siteID=1170359&id=11623015
2008年9月16日 星期二
2008年9月11日 星期四
點選封閉內一點求面積
(defun C:closearea ()
(command "-boundary" (getpoint "\n請點選封閉內一點:") "")
(command ".area" "o" "l")
(princ ",封閉內面積= ")(princ (getvar "area" ))
(princ "\nPS:注意程式會在封閉內繪製一pline物件!")
(princ)
)
(command "-boundary" (getpoint "\n請點選封閉內一點:") "")
(command ".area" "o" "l")
(princ ",封閉內面積= ")(princ (getvar "area" ))
(princ "\nPS:注意程式會在封閉內繪製一pline物件!")
(princ)
)
2008年9月3日 星期三
2008年9月2日 星期二
windows messenger啟動應用程式共用
windows messenger啟動應用程式共用
1.在選單上點選,執行/啟動應用程式共用;
(對方按|接受|)
2.選取,桌面,按一下[共用];
3.按一下[允許控制],勾選,◎自動接受要求控制的請求;
4.按一下[關閉]。
5.(對方可以至你的電腦操作)
1.在選單上點選,執行/啟動應用程式共用;
(對方按|接受|)
2.選取,桌面,按一下[共用];
3.按一下[允許控制],勾選,◎自動接受要求控制的請求;
4.按一下[關閉]。
5.(對方可以至你的電腦操作)
2008年9月1日 星期一
在指令行顯示說明
ThisDrawing.Utility.Prompt "顯示說明:" & Chr(9)
ThisDrawing.Utility.Prompt "使用TAB及換行" & vbCrLf
成員 常數 對等用法 說明
CrLf vbCrLf Chr(13) + Chr(10) 歸位/換行字元 (Carriage Return/Linefeed) 組合
Cr vbCr Chr(13) 歸位字元
Lf vbLf Chr(10) 換行字元
TAB vbTab Chr(9) TAB字元
資料參考:
http://tw.knowledge.yahoo.com/question/question?qid=1008060601473
ThisDrawing.Utility.Prompt "使用TAB及換行" & vbCrLf
成員 常數 對等用法 說明
CrLf vbCrLf Chr(13) + Chr(10) 歸位/換行字元 (Carriage Return/Linefeed) 組合
Cr vbCr Chr(13) 歸位字元
Lf vbLf Chr(10) 換行字元
TAB vbTab Chr(9) TAB字元
資料參考:
http://tw.knowledge.yahoo.com/question/question?qid=1008060601473
載入一個Block
Sub 載入一個Block()
Dim returnPnt As Variant
Dim oBlockRef As AcadBlockReference
Dim insertionPnt(0 To 2) As Double, EndPoint(2) As Double
returnPnt = ThisDrawing.Utility.GetPoint(, "請點選插入點: ")
insertionPnt(0) = returnPnt(0): insertionPnt(1) = returnPnt(1): insertionPnt(2) = 0#
Set oBlockRef = ThisDrawing.ModelSpace.InsertBlock(insertionPnt, "xbox", 1, 1, 1, 0)
MsgBox "完成載入一個Block", vbOKOnly, "Block名稱xbox"
End Sub
Dim returnPnt As Variant
Dim oBlockRef As AcadBlockReference
Dim insertionPnt(0 To 2) As Double, EndPoint(2) As Double
returnPnt = ThisDrawing.Utility.GetPoint(, "請點選插入點: ")
insertionPnt(0) = returnPnt(0): insertionPnt(1) = returnPnt(1): insertionPnt(2) = 0#
Set oBlockRef = ThisDrawing.ModelSpace.InsertBlock(insertionPnt, "xbox", 1, 1, 1, 0)
MsgBox "完成載入一個Block", vbOKOnly, "Block名稱xbox"
End Sub
將選取的所有0層物件切換至圖層「Stu_temp」
(defun c:move0(/ ss)
(princ "\n 將選取的所有0層物件切換至圖層「Stu_temp」...")
(setq ss (ssget "x" '((8 . "0"))))
(command "change" ss "" "p" "la" "Stu_temp" "")
(princ (strcat "\n 完成切換至圖層「Stu_temp」!共" (rtos (sslength ss) 2 0) "個."))
(princ)
);end movetemp
(princ "\n 將選取的所有0層物件切換至圖層「Stu_temp」...")
(setq ss (ssget "x" '((8 . "0"))))
(command "change" ss "" "p" "la" "Stu_temp" "")
(princ (strcat "\n 完成切換至圖層「Stu_temp」!共" (rtos (sslength ss) 2 0) "個."))
(princ)
);end movetemp
2008年8月18日 星期一
刪除所有block
;刪除所有block
(defun C:ea (/ ss)
(if (= (setq ss (ssget "x" '((0 . "INSERT")))) nil)
(princ "\n沒有物件.")
(command "erase" ss "")
)
(princ)
)
;其它應用
;1.選取name圖層中的所有block
;(setq ss (ssget "x" '((0 . "INSERT")(8 . "NAME"))))
;2.選取970815圖塊
;(setq ss (ssget "x" (list (cons 0 "INSERT")(cons 2 "970815"))))
(defun C:ea (/ ss)
(if (= (setq ss (ssget "x" '((0 . "INSERT")))) nil)
(princ "\n沒有物件.")
(command "erase" ss "")
)
(princ)
)
;其它應用
;1.選取name圖層中的所有block
;(setq ss (ssget "x" '((0 . "INSERT")(8 . "NAME"))))
;2.選取970815圖塊
;(setq ss (ssget "x" (list (cons 0 "INSERT")(cons 2 "970815"))))
2008年8月4日 星期一
AVIRA AntiVir PersonalEdition Classic功能強大又免費的防毒軟體
功能強大又免費的防毒(雨傘)軟體
官方網站: http://www.free-av.com/
安裝時勾選「Generate random serial number and submit during update」,程式就會幫你自動產生序號及執行更新。
下載 Avira AntiVir Personal Edition Classic 7.00.04.15 Windows NT/2000/XP/Vista 32 Bit 版:
下載 Avira AntiVir Personal Edition Classic 7.00.04.13 Windows 98/ME 版:
連結官方網站下載 Avira AntiVir Personal Edition Classic:
以下有安裝教學(資料參考):
http://tw.myblog.yahoo.com/jw!yOuTmlCTEx6jYMkty.hkSw--/article?mid=24&pk=antivir
官方網站: http://www.free-av.com/
安裝時勾選「Generate random serial number and submit during update」,程式就會幫你自動產生序號及執行更新。
下載 Avira AntiVir Personal Edition Classic 7.00.04.15 Windows NT/2000/XP/Vista 32 Bit 版:
下載 Avira AntiVir Personal Edition Classic 7.00.04.13 Windows 98/ME 版:
連結官方網站下載 Avira AntiVir Personal Edition Classic:
以下有安裝教學(資料參考):
http://tw.myblog.yahoo.com/jw!yOuTmlCTEx6jYMkty.hkSw--/article?mid=24&pk=antivir
2008年8月3日 星期日
Novell強制重新開機
指令:
reset server -f
資料參考:
http://www.novell.com/documentation/oes/sos__enu/index.html?page=/documentation/oes/sos__enu/data/henukmm4.html
reset server -f
資料參考:
http://www.novell.com/documentation/oes/sos__enu/index.html?page=/documentation/oes/sos__enu/data/henukmm4.html
AutoLISP抓取X,Y座標練習(car與cadr)
;
(defun c:zz( / pt0)
(setq pt0 (getpoint "\n請點選標示點: "))
(print pt0)
(print (list (car pt0) (cadr pt0))) ;抓取X,Y座標
(princ)
)
(defun c:zz( / pt0)
(setq pt0 (getpoint "\n請點選標示點: "))
(print pt0)
(print (list (car pt0) (cadr pt0))) ;抓取X,Y座標
(princ)
)
訂閱:
文章 (Atom)
Search Google
熱門文章
-
前言:結束 Word 時,可能會出現提示要求您一定要將變更儲存至共用範本 Normal.dot 中。首先,您可以關閉提示,而 Word 將會自動儲存變更,但可能還是會發生問題。第二,您的 Normal.dot 範本可能會受到巨集病毒的感染。如果要解決這個問題,您必須在電腦上安...
-
前言:電腦開機後就是要直接到桌面使用不想選取帳號和輸入密碼方法如下; 1. 選取,開始/執行,輸入「rundll32 netplwiz,UsersRunDll」,按一下,[確定] ; 2.取消勾選"必須輸入使用者名稱和密碼,才能使用這台電腦",按一下...
-
IMT-瑛茂電子股份有限公司下載 http://www.inmax.com.tw/ 司內網頁下載 http://nts1191.ceci.com.tw/Intranet/IntranetSetup.htm CR0530智慧卡讀卡機驅動程式 資料來源:兆豐國際商業銀行 微亮電...
-
前言:Word表格抬頭有一些是3個欄位,使用合併儲存格將表格合併為一個方法如下; 1.如下WORD表格完成的樣子 ; 2.將要合併的表格選取,功能區選取,版面配置/合併/[合併儲存格] ; 3.完成後3個欄位被合併成一格。 延伸閱讀: 使用word開啟網頁資料...
-
前言:這篇CSharp程式分享是個人找工作來在網路社群、討論區所看到的文章試著使用C#完成的小程式; 1. 功能:批次將圖面zoomE後存檔(autocad使用DLL程式) 心得:使用到的技巧即拖拽檔案到Form 下載: https://www.dropbox.com/...
-
網址清理工具 Pro 網址清理工具 Pro 貼上網址或一般文字,選擇處理規則,再複製結果 ① 輸入內容 貼上 處理 複製結果 清空 ...
-
前言:有一些EXCEL檔內容不多可是檔案大小確是很大一個的解決方法,或者你在網頁上去複製貼上一個有網頁程式的網頁而要刪除,方法如下; 1. 如下為網頁上去複製貼上一個有網頁程式的網頁貼上後內容有一堆程式物件 ; 2.點選「功能區」的常用,編輯/尋找與選取/到 ; 3...
-
因為 VPN 目前已停止使用 所以建議使用新版 SVPN 連結(第一次連會安裝程式) svpn網址 : https://svpn.ceci.com.tw 使用前先設定信任的網站: http://a-horng.blogspot.com/2007/05/ie6-pro...
-
前言:使用AutoCAD autolisp建立一個 AddressArea 圖層,並且如果圖層已經建立即將 AddressArea 設定為目前圖層,程式如下: (if (null (tblsearch "LAYER" "AddressAr...
-
前言:outlook因為ost檔搞壞而無法開啟; 1.一開啟outlook就是出現如下錯誤 ; 2. 按一下,[取消],結束outlook ; 3.使用如下連結方法修復檔案; http://office.microsoft.com/zh-tw/outlook-h...