pmq 发表于 2015-2-24 16:21:09

VB怎样将整张图纸制成一个块

    Dim BlockRefobj As AcadBlockReference
    Dim Blockobject As AcadBlock
    Dim Blockinspoint(0 To 2) As Double
    Blockinspoint(0) = 0
    Blockinspoint(1) = 0
    Blockinspoint(2) = 0
    Set Blockobject = ThisDrawing.Blocks.Add(Blockinspoint, "block1") '这是添加对象要怎样才可以一次性添加所有对象
   

zzyong00 发表于 2015-2-25 19:46:07

AttachExternalReference
然后
bind

zzyong00 发表于 2015-2-27 20:51:40

直接插入文件成块:
Public Sub ss()
    Dim p1
            p1 = ThisDrawing.Utility.GetPoint(, "请指定插入点<0,0>:")
    If IsEmpty(p1) Then
      'ReDim P1(2)
      p1 = Array(0, 0, 0)
    End If


    ThisDrawing.ModelSpace.InsertBlock p1, "D:\Program Files\shlisp2008\Blklib\卫生间详图\-1f集水坑.dwg", 1, 1, 1, 0
End Sub
页: [1]
查看完整版本: VB怎样将整张图纸制成一个块