明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1423|回复: 2

[求助] 帮我看看程序里面的问题,需要高手!

[复制链接]
发表于 2005-5-8 19:40:00 | 显示全部楼层 |阅读模式
本帖最后由 作者 于 2005-5-8 22:11:23 编辑

当调用它时出现提示 “LIMITS.scr” 未找到文件 ,可是当我把这句注释掉以后又会出现 “layer.scr” 未找到文件 是怎么回事啊?哪位高手能指教一下啊?谢谢! Sub thno()
hc = d4 / 2 + h + l
If hc <= 148 Then
no = 5
ElseIf hc > 148 And hc <= 210 Then
no = 4
ElseIf hc > 210 And hc <= 297 Then
no = 3
ElseIf hc > 297 And hc <= 420 Then
no = 2
ElseIf hc > 420 And hc <= 594 Then
no = 1
ElseIf hc > 594 Then
no = 0
End If

If no = 0 Then
bb = 1189: ll = 841: cc = 10
ElseIf no = 1 Then
bb = 841: ll = 594: cc = 10
ElseIf no = 2 Then
bb = 594: ll = 420: cc = 10
ElseIf no = 4 Then
bb = 420: ll = 297: cc = 5
ElseIf no = 5 Then
bb = 297: ll = 210: cc = 5
End If

aa = 25
'定作图极限
Dim ww, hh As String
ww = LTrim(Str(bb))
hh = LTrim(Str(ll))
Print #1, ""
Print #1, "LIMITS 0,0"; ww; ","; hh
'画外框
Print #1, "LAYER S 0"
Print #1, "Rectangle"
Print #1, "0,0"
Print #1, ww; ","; hh
'微锁缩摄影线
Dim wl, hl, w0, w6, h0, h5 As String
For i = 1 To 3
wl = LTrim(Str(i * bb / 4))
hl = LTrim(Str(i * hh / 4))
h0 = LTrim(Str(cc))
w0 = LTrim(Str(aa))
h5 = LTrim(Str(hh - cc))
w0 = LTrim(Str(aa))
w6 = LTrim(Str(ww - cc))
'竖
Print #1, "line" '上
Print #1, wl; ","; hh
Print #1, wl; ","; h5
Print #1, ""
Print #1, "LINE " '下
Print #1, wl; ","; h0
Print #1, wl; ","; "0"
Print #1, ""
'横
Print #1, "LINE" '左
Print #1, "0"; ","; hl
Print #1, w0; ","; hl
Print #1, ""
Print #1, "LINE" '右
Print #1, w6; ","; hl
Print #1, ww; ","; hl
Print #1, "" Next i
'画内框
Print #1, "LAYER S 2" '换层
wl = LTrim(Str(bb - cc))
hl = LTrim(Str(ll - cc))
Print #1, "Rectangle "
Print #1, w0; ","; h0
Print #1, w6; ","; h5
Print #1, ""
'画标题栏
Dim hh1, h2, h3, h4, xx, x1, w1, w2, w3, w4, w5 As String
h0 = LTrim(Str(cc))
h1 = LTrim(Str(cc + ll / 24))
h2 = LTrim(Str(cc + ll / 12))
h3 = LTrim(Str(cc + ll / 8))
h4 = LTrim(Str(cc + ll / 6))
x1 = (bb - cc) * 3 / 5
xx = (bb - cc - x1) / 5
w1 = LTrim(Str(x1))
w2 = LTrim(Str(x1 + xx))
w3 = LTrim(Str(x1 + 2 * xx))
w4 = LTrim(Str(x1 + 3 * xx))
w5 = LTrim(Str(x1 + 4 * xx))
'粗线
Print #1, "LINE"
Print #1, w1; ","; h0
Print #1, w1; ","; h4
Print #1, w6; ","; h4
Print #1, ""
'画横格细线
'Print #1, "LAYER S 0" '换层
Print #1, "LINE"
Print #1, w1; ","; hh1
Print #1, w6; ","; hh1
Print #1, ""
Print #1, ""
Print #1, w1; ","; h2
Print #1, w6; ","; h2
Print #1, ""
Print #1, ""
Print #1, w4; ","; h3
Print #1, w6; ","; h3
Print #1, ""
Print #1, ""
'画竖格细线
Print #1, w2; ","; h0
Print #1, w2; ","; h2
Print #1, ""
Print #1, ""
Print #1, w3; ","; h0
Print #1, w3; ","; h2
Print #1, ""
Print #1, ""
Print #1, w4; ","; h0
Print #1, w4; ","; h4
Print #1, ""
Print #1, ""
Print #1, w5; ","; hh1
Print #1, w5; ","; h4
Print #1, ""
'填标题栏项目
h0 = LTrim(Str(cc + ll / 6 - 18))
h1 = LTrim(Str(cc + ll / 24 - 8))
h2 = LTrim(Str(cc + ll / 12 - 8))
h3 = LTrim(Str(cc + ll / 8 - 8))
h4 = LTrim(Str(cc + ll / 6 - 8))
w0 = LTrim(Str(x1 + 12))
w1 = LTrim(Str(x1 + 6))
w2 = LTrim(Str(x1 + xx + 6))
w3 = LTrim(Str(x1 + 2 * xx + 2))
w4 = LTrim(Str(x1 + 3 * xx + 6))
w5 = LTrim(Str(x1 + 4 * xx + 6))
w6 = LTrim(Str(x1 + 3 * xx + 2))
'Call common.Style(2)
Print #1, "TEXT"
Print #1, w0; ","; h0
Print #1, "10"
Print #1, "0"
Print #1, TextBox19.Text
Print #1, ""
Print #1, w1; ","; h2
Print #1, "5"
Print #1, ""
Print #1, "制 图"
Print #1, ""
Print #1, w2; ","; h2
Print #1, "5"
Print #1, ""
Print #1, TextBox20.Text
Print #1, ""
Print #1, w1; ","; hh1
Print #1, ""
Print #1, ""
Print #1, "审 核"
Print #1, ""
Print #1, w2; ","; hh1
Print #1, ""
Print #1, ""
Print #1, TextBox22.Text
Print #1, ""
Print #1, w4; ","; h4
Print #1, ""
Print #1, ""
Print #1, "图 号"
Print #1, ""
Print #1, w4; ","; h3
Print #1, ""
Print #1, ""
Print #1, "材 料"
Print #1, ""
Print #1, w4; ","; h2
Print #1, ""
Print #1, ""
Print #1, "件 数"
Print #1, ""
Print #1, w6; ","; hh1
Print #1, ""
Print #1, ""
If num > 2 Then
Print #1, "学校"; TextBox24.Text; "级"
Else
Print #1, "学校"; TextBox24.Text; "级"
End If
'Call common.Style(1)
Print #1, "TEXT"
Print #1, w3; ","; h2
Print #1, ""
Print #1, ""
Print #1, TextBox25.Text
Print #1, ""
Print #1, w3; ","; hh1
Print #1, ""
Print #1, ""
Print #1, TextBox26.Text
Print #1, ""
Print #1, w5; ","; h4
Print #1, ""
Print #1, ""
Print #1, TextBox27.Text
Print #1, ""
Print #1, w5; ","; h2
Print #1, ""
Print #1, ""
Print #1, TextBox22.Text
Print #1, ""
Print #1, w5; ","; h3
Print #1, ""
Print #1, ""
Print #1, TextBox21.Text
Print #1, ""
Print #1, ""
End Sub
 楼主| 发表于 2005-5-8 21:06:00 | 显示全部楼层
又没人??
 楼主| 发表于 2005-5-8 22:16:00 | 显示全部楼层
我还需要一个加载填充样式的程序,谁能给我一个吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-27 17:44 , Processed in 0.167196 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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