- 积分
- 292
- 明经币
- 个
- 注册时间
- 2005-6-6
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2005-6-6 22:05:00
|
显示全部楼层
可先作好A4等图框以DWG格式存到一个指定的目录下,然后用moSpace.InsertBlock的方式插入所选取的图框.
Function insetObj()
Dim blockObj As Object Dim insertionPnt(0 To 2) As Double insertionPnt(0) = 0: insertionPnt(1) = 0: insertionPnt(2) = 0 If tuf.Text = "" Then End If If bl.Text = "" Then bl.Text = "1:1" zx = "D:" & "\tff\" & tuf.Text & ".dwg" Dim sysVarData As Variant xx = Len(bl.Text) yy = InStr(1, bl.Text, ":", 1) zz = xx - yy zf = Val(Left(bl.Text, yy - 1)) zi = Val(Right(bl.Text, zz) / zf) 'CByte sysVarName = "dimScale" 'OSMODE ' On Error Resume Next If SelVersion = True Then moSpace.InsertBlock insertionPnt, zx, zi, zi, zi, 0 Else: moSpace.InsertBlock insertionPnt, zx, zi, zi, 0 End If acadApp.Application.ZoomExtents
End Function
' RetVal = object.InsertBlock(InsertionPoint, Name, Xscale, Yscale, ZScale, Rotation) |
|