- 1、本文档共9页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
cad中读取文本文件内容(Read the contents of a text file in CAD)
cad中读取文本文件内容(Read the contents of a text file in CAD)
bonzh as boolean dim
bonzh = false
sun zh as string
(a) = ucase text桩号.text)
错误处理
on error resume next
设置标准对话框
with comdlg
.dialogtitle = 选择文本文件
文本文件. filter = (*. txt), *. txt | | 所有文件 (*. *) |. * * *
.initdir = d: \.
.showopen
end with
文件类型错误的判断
the right (comdlg.filename, (3) txt.
msgbox 不支持的文件格式 vbcritical, 警告!
exit sub
end if
dim i as integer
i = 0
dim n as integer
n = 0
dim b as integer
打开文件的操作
open comdlg.filename # for input as 1
do while not eof (1) 循环至文件尾.
textline as string dim
line input # 1, textline 读入一行数据并将其赋予某变量.
tempzh as string dim
b = 2 (1) textline, ,, 1) 获得第一个, 桩号, 并换成大写
an tempzh = ucase (textline (b - 1)).
if tempzh = zh.
tempstr as string dim
获得桩号
tempzhuang.zhuanghao = tempzh
截掉桩号
textline = right (textline, len (textline) - b)
获得桩径
b = 2 (1) textline, ,, 1) 获得第二个, 桩径
tempzhuang.zhuangjin = left (textline (b - 1)
textline = right (textline, len (textline) - b)
text桩径.text = tempzhuang.zhuangjin
获得砼强度
b = 2 (1) textline, ,, 1)
= left (textline tempzhuang. tong (1).
textline = right (textline, len (textline) - b)
text砼.text = tempzhuang. tong
桩顶标高
b = 2 (1) textline, ,, 1)
tempzhuang. ding = left (textline (b - 1)
textline = right (textline, len (textline) - b)
i text桩顶.text = tempzhuang.
获得笼长
b = 2 (1) textline, ,, 1)
tempzhuang.longchang = left (textline (b - 1)
textline = right (textline, len (textline) - b)
text笼长.text = tempzhuang.
Longchang
桩顶钢筋
B = instr (1, textline, ,, 1)
Tempzhuang.zd = left (textline, (B - 1)
Textline = right (textline, len (textline) - b)
Text桩顶钢筋.text = tempzhuang.zd
获得主筋1规格
B = instr (1, textline, ,, 1)
Tempzhuang.zj1guige = left (textline, (B - 1)
Textline = right (textline, len (textline) - b)
Text主筋 1.text = tempzhuang.zj1guige
获得主筋2规格
B = instr (1, textline, ,, 1)
Tempzhuang.zj2guige = left (textline, (B - 1)
Textline = right (textline, len (textline) - b)
If tempzhuang.zj2guige 0 then text主筋 2.text = tempzhuang.zj2guige
加强筋规格
B = instr (1, textline,
您可能关注的文档
- 2011年福建省普通高中学生学业基础会考(Fujian basic high school students' academic foundation examination in 2011).doc
- 2011年高考地理复习必须知晓的九大锦囊(Nine tips for geography review must be aware of the college entrance examination in 2011).doc
- 2011新甲级设计院(2011 New Grade A Design Institute).doc
- 2011注册电气工程师基础考试大纲(2011 basic examination program for Registered Electrical Engineers).doc
- 2011注册考试大纲档(2011 registration examination outline file).doc
- 2011考研普地专业课重点(2011 postgraduate courses focus on PU).doc
- 2011语文中考模拟题(2011 Chinese exam simulation).doc
- 2011考研数学大纲(附带综述)(2011 postgraduate entrance examination mathematics outline (incidental review)).doc
- 2011资深语录300条(2011 senior quotations 300).doc
- 2011走向高考地理全程总复习一轮练习第一部分3-3(2011, to the college entrance examination, geography, the whole review, a round of exercises Part I, 3-3).doc
文档评论(0)