- 积分
- 495
- 明经币
- 个
- 注册时间
- 2005-3-14
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
本帖最后由 作者 于 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
|
|