hustdiamon 发表于 2006-11-15 22:25:00

关于insertblock方法,请高手解惑!

<P>Option Explicit<BR>Public Sub textatt()<BR>Dim objrefer As Variant<BR>Dim strname As String<BR>Dim objblock As AcadBlock<BR>Dim dblx As Double<BR>Dim dbly As Double<BR>Dim dblz As Double<BR>Dim dblrotation As Double</P>
<P>On Error Resume Next<BR>dblx = 0<BR>dbly = 0<BR>dblz = 0<BR>dblrotation = 0<BR>With ThisDrawing.Utility<BR>ThisDrawing.Utility.InitializeUserInput 1<BR>objrefer = .GetPoint(, vbCr &amp; "pick the inserpoint:")<BR>End With<BR>On Error Resume Next<BR>Set objblock = ThisDrawing.ModelSpace.insertblock(objrefer, "M:\f-0002.dwg", dblx, dbly, dblz, dblrotation)<BR>If Err Then MsgBox "unable to insert this block."<BR>End Sub</P>
<P>为什么不能插入该文件中的块呢?</P>
<P>谢先!</P>
<P><BR>&nbsp;</P>

wyj7485 发表于 2006-11-16 08:46:00

参考:<A href="http://bbs.mjtd.com/forum.php?mod=viewthread&tid=6098" target="_blank" >http://bbs.mjtd.com/forum.php?mod=viewthread&tid=6098</A>

hustdiamon 发表于 2006-11-16 22:10:00

谢谢,我会继续深入研究的!!!有空请教!!!

xinghesnak 发表于 2006-11-17 14:46:00

<P>dblx = 0<BR>dbly = 0<BR>dblz = 0</P>
<P>x,y,z轴比例不能为0</P>
页: [1]
查看完整版本: 关于insertblock方法,请高手解惑!