田草博客

互联网田草博客


网友交流QQ群:11740834 需注明申请加入原因

微信 公众号:ByCAD

邮箱:tiancao1001x126.com
ByCAD,微信公众号
首页 | 普通 | 电脑 | AutoCAD | VB/VB.NET | FLash | 结构 | 建筑 | 电影 | BIM | 规范 | 软件 | ID

评论列表

tiancao1001
所发表的评论
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... [37]  
tiancao1001 于 2024-05-31 12:14 AM 发表评论:
可能与CAD设置有关,我的CAD2020出错这错误,2014则不会
查看所评论的日志:内部错误 eregen 8 0
tiancao1001 于 2024-05-26 01:51 PM 发表评论:
<CommandMethod("TcTxtDaoXu")>
    Public Sub TcTxtDaoXu()
        On Error Resume Next
        Dim acDc As Document = Application.DocumentManager.MdiActiveDocument
        Dim acDb As Database = acDc.Database
        Dim acTypValAr(0) As TypedValue
        acTypValAr.SetValue(New TypedValue(DxfCode.Start, "TEXT"), 0)
        Dim acSelFtr As SelectionFilter = New SelectionFilter(acTypValAr)
        Dim acSSPrompt As PromptSelectionResult = acDc.Editor.GetSelection(acSelFtr)
        If acSSPrompt.Status = PromptStatus.OK Then '选择成功
            Dim acSS As SelectionSet = acSSPrompt.Value
            For Each id As ObjectId In acSS.GetObjectIds
                Using acTrans As Transaction = acDb.TransactionManager.StartTransaction()
                    Dim acTxt As DBText = acTrans.GetObject(id, OpenMode.ForWrite)
                    Dim str As String = acTxt.TextString
                    Dim strArr As Char() = str.ToCharArray
                    Array.Reverse(strArr)
                    Dim NewStr As New String(strArr)
                    acTxt.TextString = NewStr
                    acTrans.Commit()
                End Using
            Next
        End If
    End Sub
查看所评论的日志:CAD文字倒序
tiancao1001 于 2024-05-20 07:48 PM 发表评论:
隐藏日志的评论
查看所评论的日志:AutoCAD .net 打印时候,窗口出现偏移,甚至打印出空白来?
tiancao1001 于 2024-03-31 07:29 PM 发表评论:
#Const AutoCADorGrxCAD = "AutoCAD"

#If AutoCADorGrxCAD = "AutoCAD" Then
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.GraphicsInterface
Imports Autodesk.AutoCAD.PlottingServices
Imports Autodesk.AutoCAD.Windows
Imports Autodesk.AutoCAD.Windows.Palette
Imports Autodesk.AutoCAD.Colors
#ElseIf AutoCADorGrxCAD = "GrxCAD" Then
Imports GrxCAD.EditorInput
Imports GrxCAD.ApplicationServices
Imports GrxCAD.DatabaseServices
Imports GrxCAD.Geometry
Imports GrxCAD.Runtime
Imports GrxCAD.Windows
Imports GrxCAD.Internal
Imports GrxCAD.Windows.Palette
#ElseIf AutoCADorGrxCAD = "ZwCAD" Then
Imports ZwSoft.ZwCAD.EditorInput
Imports ZwSoft.ZwCAD.ApplicationServices
Imports ZwSoft.ZwCAD.DatabaseServices
Imports ZwSoft.ZwCAD.Geometry
Imports ZwSoft.ZwCAD.Runtime
Imports ZwSoft.ZwCAD.Windows
Imports ZwSoft.ZwCAD.GraphicsInterface
#End If

#If AutoCADorGrxCAD = "AutoCAD" Then
Imports AcCAD = Autodesk.AutoCAD
Imports AcWin = Autodesk.AutoCAD.Windows
Imports AcDoc = Autodesk.AutoCAD.ApplicationServices.Document
Imports AcApp = Autodesk.AutoCAD.ApplicationServices.Application
Imports AcDbs = Autodesk.AutoCAD.DatabaseServices
#ElseIf AutoCADorGrxCAD = "GrxCAD" Then
Imports AcCAD = GrxCAD
Imports AcWin = GrxCAD.Windows
Imports AcDoc = GrxCAD.ApplicationServices.Document
Imports AcApp = GrxCAD.ApplicationServices.Application
Imports AcDBs = GrxCAD.DatabaseServices
#ElseIf AutoCADorGrxCAD = "ZwCAD" Then
Imports AcCAD = ZwSoft.ZwCAD
Imports AcWin = ZwSoft.ZwCAD.Windows
Imports AcDoc = ZwSoft.ZwCAD.ApplicationServices.Document
Imports AcApp = ZwSoft.ZwCAD.ApplicationServices.Application
Imports AcDBs = ZwSoft.ZwCAD.DatabaseServices
#End If
Imports System
<Assembly: ExtensionApplication(GetType(TcOpenDwg.TcOpenDwg))>
Namespace TcOpenDwg
    Public Class TcOpenDwg
        Implements IExtensionApplication
        Dim JiShi As New System.Diagnostics.Stopwatch
        Sub Initialize() Implements IExtensionApplication.Initialize
            AddHandler Application.DocumentManager.DocumentCreateStarted, AddressOf Application_DocumentCreateStarted
        End Sub
        Sub Terminate() Implements IExtensionApplication.Terminate
        End Sub
        Private Sub Application_DocumentCreateStarted(ByVal sender As Object,
                                   ByVal e As DocumentCollectionEventArgs)
            AddHandler e.Document.BeginDwgOpen, AddressOf Document_BeginDwgOpen
            AddHandler e.Document.EndDwgOpen, AddressOf Document_EndDwgOpen
        End Sub
        Public Sub Document_BeginDwgOpen(ByVal senderObj As Object,
                                         ByVal docBegClsEvtArgs As DrawingOpenEventArgs)
            On Error Resume Next
            MsgBox("图纸打开,计时开始 。")
            JiShi.Start()
            If Err.Number > 0 Then
                MsgBox("Document_BeginDwgOpen Err:" & Err.Description)
                Err.Clear()
            End If
        End Sub
        Public Sub Document_EndDwgOpen(ByVal senderObj As Object,
                                       ByVal docBegClsEvtArgs As DrawingOpenEventArgs)
            On Error Resume Next
            JiShi.Stop()
            MsgBox("打开结束,耗时:" & JiShi.Elapsed.TotalMilliseconds & "毫秒")
            If Err.Number > 0 Then
                MsgBox("Document_EndDwgOpen Err:" & Err.Description)
                Err.Clear()
            End If
        End Sub
    End Class

End Namespace
查看所评论的日志:AutoCAD2025打开图纸到底有多快?
tiancao1001 于 2022-07-21 09:18 PM 发表评论:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://www.bycad.cn/")
        request.AllowAutoRedirect = True
        request.MaximumAutomaticRedirections = 50
        request.ServicePoint.Expect100Continue = True
        request.CookieContainer = New CookieContainer()
        Dim response As System.Net.HttpWebResponse = request.GetResponse()
        Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
        Dim sourcecode As String = sr.ReadToEnd()
        TextBox1.Text = sourcecode
    End Sub
查看所评论的日志:VB 读取网页源码并分析其中的URL
tiancao1001 于 2022-05-25 06:04 PM 发表评论:
https://blog.csdn.net/beckhans/article/details/13503499
查看所评论的日志:convert WCS to UCS
tiancao1001 于 2022-02-13 10:41 PM 发表评论:
公众号ByCAD,请关注微信公众号ByCAD,公众号下方菜单即可下载
查看所评论的日志:田草CAD工具箱.Net版 下载 安装和使用说明
tiancao1001 于 2022-01-06 06:31 PM 发表评论:
公众号上可以下载
查看所评论的日志:2009全国民用建筑工程设计技术措施全套pdf
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... [37]  
Tiancao Blog All Rights Reserved 田草博客 版权所有
Copyright ©