AutoCAD顧問
還沒有註冊嗎...即日起免費註冊,所有最完整的AutoCAD討論、教學及資源都在論壇裡喔~

Join the forum, it's quick and easy

AutoCAD顧問
還沒有註冊嗎...即日起免費註冊,所有最完整的AutoCAD討論、教學及資源都在論壇裡喔~
AutoCAD顧問
Would you like to react to this message? Create an account in a few clicks or log in to continue.
[討論]Autocad VB.Net 練習一 Ioaoe110[討論]Autocad VB.Net 練習一 2020-310[討論]Autocad VB.Net 練習一 Oiu15010[討論]Autocad VB.Net 練習一 2020-211[討論]Autocad VB.Net 練習一 Ia15010[討論]Autocad VB.Net 練習一 Aizyao10[討論]Autocad VB.Net 練習一 Uos15010[討論]Autocad VB.Net 練習一 BPl3tjj[討論]Autocad VB.Net 練習一 Ziao1510
[討論]Autocad VB.Net 練習一 Oo-2-110[討論]Autocad VB.Net 練習一 Zuoiy_10[討論]Autocad VB.Net 練習一 Aizyao11[討論]Autocad VB.Net 練習一 Iyb_1510[討論]Autocad VB.Net 練習一 Aoe1-111[討論]Autocad VB.Net 練習一 Uos15011[討論]Autocad VB.Net 練習一 Aoe2da10[討論]Autocad VB.Net 練習一 Aoe2da11[討論]Autocad VB.Net 練習一 Aoe10

[討論]Autocad VB.Net 練習一

向下

[討論]Autocad VB.Net 練習一 Empty [討論]Autocad VB.Net 練習一

發表 由 shackle_2005 周一 12 12月 2016 - 10:39

我拿影像檔(jpg) 來練 VB.Net, 一開始有點麻煩, 後來覺得功能蠻好的. 參考一下. 程式使用: 1. 將 222.jpg 放在 C:\ 2. 輸入 netload 3. 選擇 get_outline.dll 4. 輸入 mm 5. 在原點會用圓畫出字樣. 我的電腦環境 : windows 7 64 bits, Autocad 2014 64 bits, Visual Studio Express 2012
附件
[討論]Autocad VB.Net 練習一 Attachment
222.zip 您無權下載這里的附件。(81 Kb) 下載 4 次
[討論]Autocad VB.Net 練習一 Attachment
get_outline.zip 您無權下載這里的附件。(7 Kb) 下載 4 次
[討論]Autocad VB.Net 練習一 Attachment
get_outline_20161212.zip 您無權下載這里的附件。(193 Kb) 下載 3 次
[討論]Autocad VB.Net 練習一 Attachment
get_outline_codes_001.zip 您無權下載這里的附件。(198 Kb) 下載 4 次


shackle_2005 在 周一 12 12月 2016 - 11:27 作了第 1 次修改

____________________________________________________________________________________
[討論]Autocad VB.Net 練習一 Ioaoe110 [討論]Autocad VB.Net 練習一 Zuoiy_10 [討論]Autocad VB.Net 練習一 2020-211 [討論]Autocad VB.Net 練習一 Aizyao11 [討論]Autocad VB.Net 練習一 Iyb_1510
[討論]Autocad VB.Net 練習一 Aizyao10 [討論]Autocad VB.Net 練習一 BPl3tjj.png [討論]Autocad VB.Net 練習一 Ziao1510 [討論]Autocad VB.Net 練習一 Oo-2-110 [討論]Autocad VB.Net 練習一 Oooa_110
shackle_2005
shackle_2005
初級會員
初級會員

文章總數 : 232
年齡 : 52
來自 : 台中
職業 : 程式設計
愛好 : 音樂
個性 : 隨和
使用年資 : 10 年
使用版本 : 2013
積分 : 3
經驗值 : 6514
威望值 : 355
注冊日期 : 2010-09-20
男 獅子座 豬

回頂端 向下

[討論]Autocad VB.Net 練習一 Empty 回復: [討論]Autocad VB.Net 練習一

發表 由 shackle_2005 周一 12 12月 2016 - 11:12

Imports System
Imports System.Drawing
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.EditorInput



Public Class Class1
    _
   Public Sub mm()
       Dim doc As Document = Application.DocumentManager.MdiActiveDocument
       Dim db As Database = doc.Database
       Dim ed As Editor = doc.Editor
       Dim myBitmap As System.Drawing.Bitmap
       Dim i_count As Integer
       Dim d_count As Integer
       Dim radius As Double

       radius = 0.005

       myBitmap = New System.Drawing.Bitmap("c:\222.jpg")

       ' Get the color of a pixel within myBitmap.
       Dim pixelColor As Color
       Dim center As Point3d

       For i_count = 0 To myBitmap.Width - 1
           For d_count = 0 To myBitmap.Height - 1
               pixelColor = myBitmap.GetPixel(i_count, d_count)
               If Mid(pixelColor.Name.ToString, 1, 2) = "ff" And _
                                      Mid(pixelColor.Name.ToString, 3, 1) = "0" Then

                   center = New Point3d(i_count * radius * 2, (myBitmap.Height - d_count) * radius * 2, 0)

                   Using trans As Transaction = db.TransactionManager.StartTransaction()

                       Dim space As BlockTableRecord = trans.GetObject(db.CurrentSpaceId, OpenMode.ForWrite)
                       Dim circle As Circle = New Circle(center, Vector3d.ZAxis, radius)

                       space.AppendEntity(circle)
                       trans.AddNewlyCreatedDBObject(circle, True)

                       trans.Commit()
                   End Using
               End If
           Next
       Next
   End Sub
End Class
附件
[討論]Autocad VB.Net 練習一 Attachment
222.jpg 您無權下載這里的附件。(82 Kb) 下載 0 次

____________________________________________________________________________________
[討論]Autocad VB.Net 練習一 Ioaoe110 [討論]Autocad VB.Net 練習一 Zuoiy_10 [討論]Autocad VB.Net 練習一 2020-211 [討論]Autocad VB.Net 練習一 Aizyao11 [討論]Autocad VB.Net 練習一 Iyb_1510
[討論]Autocad VB.Net 練習一 Aizyao10 [討論]Autocad VB.Net 練習一 BPl3tjj.png [討論]Autocad VB.Net 練習一 Ziao1510 [討論]Autocad VB.Net 練習一 Oo-2-110 [討論]Autocad VB.Net 練習一 Oooa_110
shackle_2005
shackle_2005
初級會員
初級會員

文章總數 : 232
年齡 : 52
來自 : 台中
職業 : 程式設計
愛好 : 音樂
個性 : 隨和
使用年資 : 10 年
使用版本 : 2013
積分 : 3
經驗值 : 6514
威望值 : 355
注冊日期 : 2010-09-20
男 獅子座 豬

回頂端 向下

回頂端


 
這個論壇的權限:
無法 在這個版面回復文章
[討論]Autocad VB.Net 練習一 Ioaoe110[討論]Autocad VB.Net 練習一 2020-310[討論]Autocad VB.Net 練習一 Oiu15010[討論]Autocad VB.Net 練習一 2020-211[討論]Autocad VB.Net 練習一 Ia15010[討論]Autocad VB.Net 練習一 Aizyao10[討論]Autocad VB.Net 練習一 Uos15010[討論]Autocad VB.Net 練習一 BPl3tjj[討論]Autocad VB.Net 練習一 Ziao1510
[討論]Autocad VB.Net 練習一 Oo-2-110[討論]Autocad VB.Net 練習一 Zuoiy_10[討論]Autocad VB.Net 練習一 Aizyao11[討論]Autocad VB.Net 練習一 Iyb_1510[討論]Autocad VB.Net 練習一 Aoe1-111[討論]Autocad VB.Net 練習一 Uos15011[討論]Autocad VB.Net 練習一 Aoe2da10[討論]Autocad VB.Net 練習一 Aoe2da11[討論]Autocad VB.Net 練習一 Aoe10