VBA插入块后,如何炸开??
<p>我的代码如下:</p><p>Public Sub test()</p><p>PT1(0) = TX+ 15540 * Scal: PT1(1) = TY + 990 * Scal: PT1(2) = 0</p><p>Set InsBLK = ThisDrawing.ModelSpace.InsertBlock(PT1, "C:\Program Files\ys.dwg", Scal, Scal, Scal, 3.14159 * 0)</p><p>InsBLK.Layer = "TXT"</p><p>InsBLK.Explode</p><p>End Sub</p><p>可是输出的结果为一个为炸开的块上有一个已经炸开了的块,感觉是将同一块插入了两次(在同一个位置),并把其中一个炸开了。如果把倒数第二句去掉,则只插入了一个没有炸开的块。</p> <p>看看这样行不行,</p><p>Public Sub test()</p><p>PT1(0) = TX+ 15540 * Scal: PT1(1) = TY + 990 * Scal: PT1(2) = 0</p><p>Set InsBLK = ThisDrawing.ModelSpace.InsertBlock(PT1, "*C:\Program Files\ys.dwg", Scal, Scal, Scal, 3.14159 * 0)</p><p>InsBLK.Layer = "TXT"</p><p>End Sub</p> <p>Public Sub test()</p><p>PT1(0) = TX+ 15540 * Scal: PT1(1) = TY + 990 * Scal: PT1(2) = 0</p><p>Set InsBLK = ThisDrawing.ModelSpace.InsertBlock(PT1, "C:\Program Files\ys.dwg", Scal, Scal, Scal, 3.14159 * 0)</p><p>InsBLK.Layer = "TXT"</p><p>InsBLK.Explode</p><p>InsBLK.delete</p><p>End Sub</p> <p>谢谢两位,加用*后,无法插入块了,使用delete是可以的,不过这样的原因怎么讲呢??</p> 学习了! <p>Public Sub test()</p><p>PT1(0) = TX+ 15540 * Scal: PT1(1) = TY + 990 * Scal: PT1(2) = 0</p><p>Set InsBLK = ThisDrawing.ModelSpace.InsertBlock(PT1, "C:\Program Files\ys.dwg", Scal, Scal, Scal, 3.14159)</p><p>InsBLK.Layer = "TXT"</p><p>InsBLK.Explode</p><p>InsBLK.delete</p><p>End Sub</p>
页:
[1]