明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1488|回复: 2

如何实现在CAD中的数据写到文档中去

[复制链接]
发表于 2004-4-16 16:14:00 | 显示全部楼层 |阅读模式
我想把CAD中实现的数据写到文档中去,请问如何能做到呢???
发表于 2004-4-16 16:19:00 | 显示全部楼层
(setq f (open filenmae "w"))


(princ data f);data就是数据
发表于 2004-4-16 18:21:00 | 显示全部楼层
(write-line string [file-desc])


参数


string


字符串型。


file-desc


已打开文件的文件描述符。


返回值


带有双引号的 string。但将字符串写入到文件中时会省略双引号。


样例


打开新文件:


命令:(setq f (open "c:\\my documents\\new.tst" "w"))


#<file "c:\\my documents\\new.tst">


使用 write-line 将一行文本写入文件:


命令:(write-line "To boldly go where nomad has gone before." f)


"To boldly go where nomad has gone before."


在关闭文件以前该行文本不会被真正写入文件:


命令:(close f)


nil
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-10-1 15:50 , Processed in 0.157526 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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