當前位置:編程學習大全網 - 編程軟體 - 急!請教CAD VBA裏想做成壹個塊,對象是選擇集裏的內容,請問該用什麽語句?(有個例子也可以!)

急!請教CAD VBA裏想做成壹個塊,對象是選擇集裏的內容,請問該用什麽語句?(有個例子也可以!)

Sub Example_AddMInsertBlock()

Dim circleObj As AcadCircle

Dim centerPoint(0 To 2) As Double, InsertPoint(0 To 2) As Double

Dim radius As Double

Dim newMBlock As AcadMInsertBlock

Dim newBlock As AcadBlock

Set newBlock = ThisDrawing.Blocks.Add(centerPoint, "CBlock")

Set circleObj = ThisDrawing.Blocks("CBlock").AddCircle(centerPoint, radius)

Set newMBlock = ThisDrawing.ModelSpace.AddMInsertBlock(InsertPoint, "CBlock", 1, 1, 1, 1, 2, 2, 1, 1)

CAD幫助中的方法, 把Set circleObj = ThisDrawing.Blocks("CBlock").AddCircle(centerPoint, radius)改成妳的選集entity對象 就可以了

  • 上一篇:電力公司走什麽專業
  • 下一篇:開關編程怎麽做?
  • copyright 2024編程學習大全網