明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3077|回复: 3

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

  [复制链接]
发表于 2006-11-15 22:25:00 | 显示全部楼层 |阅读模式

Option Explicit
Public Sub textatt()
Dim objrefer As Variant
Dim strname As String
Dim objblock As AcadBlock
Dim dblx As Double
Dim dbly As Double
Dim dblz As Double
Dim dblrotation As Double

On Error Resume Next
dblx = 0
dbly = 0
dblz = 0
dblrotation = 0
With ThisDrawing.Utility
ThisDrawing.Utility.InitializeUserInput 1
objrefer = .GetPoint(, vbCr & "pick the inserpoint:")
End With
On Error Resume Next
Set objblock = ThisDrawing.ModelSpace.insertblock(objrefer, "M:\f-0002.dwg", dblx, dbly, dblz, dblrotation)
If Err Then MsgBox "unable to insert this block."
End Sub

为什么不能插入该文件中的块呢?

谢先!


 

发表于 2006-11-16 08:46:00 | 显示全部楼层
 楼主| 发表于 2006-11-16 22:10:00 | 显示全部楼层
谢谢,我会继续深入研究的!!!有空请教!!!
发表于 2006-11-17 14:46:00 | 显示全部楼层

dblx = 0
dbly = 0
dblz = 0

x,y,z轴比例不能为0

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-26 20:27 , Processed in 0.167956 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表