zoukankan      html  css  js  c++  java
  • 常用语句

    1、当前活动文档   

     Dim doc As ApplicationServices.Document = ApplicationServices.Application.DocumentManager.MdiActiveDocument

    2、拾取图元

           Dim doc As ApplicationServices.Document = ApplicationServices.Application.DocumentManager.MdiActiveDocument
            Dim peo As New EditorInput.PromptEntityOptions("请指定一个图块")
            With peo
                .SetRejectMessage("需要图块")
                .AddAllowedClass(GetType(DatabaseServices.BlockReference), True)
            End With
    
            Dim per As EditorInput.PromptEntityResult = doc.Editor.GetEntity(peo)
    
            If Not per.Status = EditorInput.PromptStatus.OK Then
                Exit Sub
            End If
    View Code

     3、添加图元

     Using btr As BlockTableRecord = DirectCast(Tr.GetObject(doc.Database.CurrentSpaceId, OpenMode.ForWrite), BlockTableRecord)

        DIM1ID = btr.AppendEntity(ENT)  
    End Using

    Tr.AddNewlyCreatedDBObject(ENT, True)

     4、使用事物处理

    Using dc As ApplicationServices.DocumentLock = doc.LockDocument()
                Using Db As DatabaseServices.Database = doc.Database
                    Using Tr As DatabaseServices.Transaction = Db.TransactionManager.StartTransaction()
    
    
    
                    End Using
                End Using
            End Using
    View Code
  • 相关阅读:
    fidller 打断点
    随笔
    HTML标签介绍
    补充9.27----9.28
    html5_______9.26
    9.14
    9.13笔记
    9.12笔记
    CSS样式的引用
    html5_______9.10
  • 原文地址:https://www.cnblogs.com/rf8862/p/13726229.html
Copyright © 2011-2022 走看看