求助:为什么看不到创建的块??
<P>求助:为什么看不到创建的块??</P><P> 程序如下:</P>
<P>Sub Example_Add()<BR> ' 创建一新块,名称为"New_Block"<BR> Dim blockObj As AcadBlock<BR> <BR> ' 定义块<BR> Dim insertionPnt(0 To 2) As Double<BR> insertionPnt(0) = 0#: insertionPnt(1) = 0#: insertionPnt(2) = 0#<BR> <BR> ' 添加块到块集合中</P>
<P> Set blockObj = ThisDrawing.Blocks.Add(insertionPnt, "*N")<BR> MsgBox blockObj.Name & " has been added." & vbCrLf & _<BR> "Origin: " & blockObj.Origin(0) & ", " & blockObj.Origin(1) _<BR> & ", " & blockObj.Origin(2), , "Add Example"</P>
<P> ' 在块中创建圆.<BR> <BR> Dim circleObj As AcadCircle<BR> Dim centerPoint(0 To 2) As Double<BR> Dim radius As Double<BR> <BR> ' 定义圆<BR> centerPoint(0) = 0#: centerPoint(1) = 0#: centerPoint(2) = 0#<BR> radius = 100#<BR> <BR> ' 添加圆到块中<BR> <BR> Set circleObj = blockObj.AddCircle(centerPoint, radius)<BR> Set blockObj = Nothing</P>
<P> <BR>End Sub<BR> 请指教</P> <P>还没有插入呢,那是一个无名块</P>
页:
[1]