乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 15|回复: 5

[编程交流] How to open thefile read-only

[复制链接]

10

主题

38

帖子

28

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-6 09:21:56 | 显示全部楼层 |阅读模式
hi ^^ i wondering how can i open the file(read-only) using lisp.
can it possible?
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-6 09:40:00 | 显示全部楼层
Yes it is possible .
 
Write the File Path of your desired drawing instead of the one that I attached .
 
  1. (vl-load-com)(defun c:Test nil (vla-open (vla-get-documents (vlax-get-acad-object))           [b]"C:\\Users\\TOUCHMATE\\Desktop\\My Drawing.dwg"[/b]           :vlax-true ))
 
Tharwat
回复

使用道具 举报

10

主题

38

帖子

28

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-6 09:47:02 | 显示全部楼层
wow...you great!!! thanks ^^
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-6 10:02:08 | 显示全部楼层
 
You're welcome Arin
 
Tharwat
回复

使用道具 举报

10

主题

38

帖子

28

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-6 10:14:29 | 显示全部楼层
I USE THIS SOURCE THAT SCRIPT. FOR EXAMPLE
 
"
(vla-open (vla-get-documents (vlax-get-acad-object))
"C:\\a.dwg"
            :vlax-true
)
CIRCLE
0,0
100,100
CLOSE
(vla-open (vla-get-documents (vlax-get-acad-object))
"C:\\B.dwg"
            :vlax-true
)
CIRCLE
.
.
.
 
BUT IT DO NOT WORK   T_T
 
I want make plot lisp using script and lisp
but if file already open , script error..
so i want file open(readonly) then plot and close without save.
 
lisp is so hard  T T
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-6 10:32:41 | 显示全部楼层
You are using Lisp for such a useless things , why do not you open the file normally and after that run your scripts without including the vl codes
in that script file .
 
And why you are blaming codes since your script file rejecting the status of read only drawing ?
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-7 03:19 , Processed in 0.609663 second(s), 64 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表