皮皮网
皮皮网
eval函数的源码

【pb源码销售】【linux 驱动源码目录】【奇怪的冒险 源码】vbnet源码下载

时间:2024-12-24 08:59:55 分类:热点 编辑:乐檬源码
1.VB.Net读取AutoCAD图纸
2.求用vbnet 实现先进先出即队列得源代码

vbnet源码下载

VB.Net读取AutoCAD图纸

       å¦‚果可以的话请把分给我

       ã€€ã€€ä»¥ä¸‹æ˜¯cad版的,引用autocad type library 和autocad/objectdbx common 如果是或者版本更低的只要引用autocad type library,代码的话大同小异,思路是一样的

 

       ã€€ã€€

           Private Sub Form1_Load(ByVal sender As System.Object,码下 ByVal e As System.EventArgs) Handles MyBase.Load

               On Error Resume Next

               Dim acadapp As Autodesk.AutoCAD.Interop.AcadApplication

               acadapp = GetObject(vbNullString, "autoCAD.application")

               Dim acaddoc As Autodesk.AutoCAD.Interop.AcadDocument

               acaddoc = acadapp.ActiveDocument

               Dim Ms As Autodesk.AutoCAD.Interop.Common.AcadModelSpace

               Ms = acaddoc.ModelSpace

               Dim acadObjectI As Autodesk.AutoCAD.Interop.Common.AcadObject

               Dim Linei As Autodesk.AutoCAD.Interop.Common.AcadLine

               Dim Circlei As Autodesk.AutoCAD.Interop.Common.AcadCircle

               Dim Polylinei As Autodesk.AutoCAD.Interop.Common.AcadPolyline

               Dim pt As Autodesk.AutoCAD.Interop.Common.AcadPoint

               For Each acadObjectI In Ms

                   Debug.Print(acadObjectI.ObjectName)

                   Select Case acadObjectI.ObjectName

                       Case "AcDbLine"

                           Linei = acadObjectI

                           Debug.Print("X =" & Linei.StartPoint(0).ToString)

                           Debug.Print("Y =" & Linei.StartPoint(1).ToString)

                       Case ""

                       Case ""

                   End Select

               Next

           End Sub

求用vbnet 实现先进先出即队列得源代码

       VB.Net中的队列类在System.Collections.Generic命名空间中,名字叫Queue,码下pb源码销售是码下linux 驱动源码目录一个泛型类。

       实例化该类:

       Dim myQueue As Queue<Int>

       myQueue = new Queue<Int>();

       然后可以通过Queue中的码下奇怪的冒险 源码Enqueue和Dequeue函数进行入队出队操作:

       With myQueue

        .Enqueue(1)

        .Enqueue(2)

        .Enqueue(3)

        .Enqueue(4)

        .Enqueue(5)

       End With

       For i = 0 To 5 Step 1

        Console.WriteLine(myQueue.Dequeue())

       Next i

       显示结果:

       1

       2

       3

       4

       5

本文地址:http://04.net.cn/html/89c354596365.html

copyright © 2016 powered by 皮皮网   sitemap