- UID
- 46
- 积分
- 1317
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-9
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
这样就知道谁修改了!
下面是VBA代码,块是用的
XD的
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Sub TRZ()
Dim BLK As AcadBlockReference
Dim PT As Variant
Dim retval As Variant
Dim i As Integer
Dim r As Double
Dim s$, cnt&, dl&
cnt& = 199
s$ = String$(200, 0)
dl& = GetUserName(s$, cnt)
On Error Resume Next
r = ThisDrawing.Utility.GetReal("图章半径:(20)")
If r = nil Then r = 20
PT = ThisDrawing.Utility.GetPoint(, "插入位置")
d = 7
Set BLK = ThisDrawing.ModelSpace.InsertBlock(PT, "modify_tag1.dwg", 1, 1, 1, 0)
retval = BLK.GetAttributes()
retval(0).TextString = Mid(Date$, 9, 2)
retval(1).TextString = Mid(Date$, 6, 2)
retval(2).TextString = Left(Date$, 4)
retval(3).TextString = Left(Time$, 2)
retval(4).TextString = Mid(Time$, 4, 2)
retval(5).TextString = Left$(s$, cnt)
BLK.ScaleEntity PT, r / 20
End Sub |
|