码迷,mamicode.com
首页 > 其他好文 > 详细

创建对象

时间:2020-02-21 09:31:41      阅读:71      评论:0      收藏:0      [点我收藏+]

标签:base   obj   point   att   line   alignment   with   lsp   style   

1、创建单行文字

  Dim dt As New DatabaseServices.DBText()
  With dt
     .TextString = psr.StringResult
     .Justify = AttachmentPoint.MiddleCenter
     .AlignmentPoint = ppr.Value
     .Position = ppr.Value
     .LineWeight = LineWeight.LineWeight020
  End With
  Using bt As DatabaseServices.BlockTable = CType(tr.GetObject(db.BlockTableId, DatabaseServices.OpenMode.ForWrite), DatabaseServices.BlockTable)
     Using btr As DatabaseServices.BlockTableRecord = CType(tr.GetObject(bt(DatabaseServices.BlockTableRecord.ModelSpace), DatabaseServices.OpenMode.ForWrite), DatabaseServices.BlockTableRecord)
         btr.AppendEntity(dt)
         tr.AddNewlyCreatedDBObject(dt, True)
     End Using
  End Using

 

创建对象

标签:base   obj   point   att   line   alignment   with   lsp   style   

原文地址:https://www.cnblogs.com/rf8862/p/12340037.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!