乐筑天下

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

[综合讨论] Close script file doesn't

[复制链接]

3

主题

15

帖子

12

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-6 23:45:53 | 显示全部楼层 |阅读模式
Hello to all!
 
I have a recorded action that is a staple of mine for a long time, I used it long ago even though it was created differently, I even have a bunch of coworkers that use it. The recorded action is ZOOM EXTENTS, SAVE, RUN SCRIPT FILE; CLOSE.SCR. I think I created this back in 2010, and it has worked in every instance of AutoCAD until 2014. I originally had to record the action using the CLOSE.SCR file with the command "SAVE" in it so that it could be recorded. Once the Action was recorded, I changed the "SAVE" command to "CLOSE". So that when I type the "ZSC" name of the recorded action, it would zoom the file to extents, save it, then close the drawing. Now when I try to execute this action, it does everything except close the file. I have run the CLOSE.SCR file using the script command and still I get nothing!
 
Any help would be appreciated!
 
Thanks,
 
Matt
回复

使用道具 举报

5

主题

224

帖子

219

银币

初来乍到

Rank: 1

铜币
25
发表于 2022-7-6 23:50:56 | 显示全部楼层
So, it saves then it doesn't close? What does it say in the command line?
回复

使用道具 举报

3

主题

15

帖子

12

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-6 23:57:55 | 显示全部楼层
I get this message when I try to run it through SCRIPT command.
 
File load canceled: I:\AutoCAD Recorded Macros\CLOSE.SCR
 
I have tried to re-record the action because originally the action was for another version, then I recorded it again for 2013 to change the folder location. before I was getting this message:
 
Enter script file name : I:\AutoCAD 2013\CLOSE.SCR
"CLOSE.SCR": Can't find file.
回复

使用道具 举报

JGA

1

主题

69

帖子

69

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-7 00:04:01 | 显示全部楼层
Would it not be easier just to include all the commands in the recorded action?
回复

使用道具 举报

5

主题

224

帖子

219

银币

初来乍到

Rank: 1

铜币
25
发表于 2022-7-7 00:07:55 | 显示全部楼层
Maybe a support path is messed up?
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-7 00:11:48 | 显示全部楼层
Post the script easier to work out whats wrong you should have done that first post only need a few lines.
回复

使用道具 举报

3

主题

15

帖子

12

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-7 00:15:12 | 显示全部楼层
Sorry, the script file is simple a txt file named "CLOSE.SCR" in it is simply the word "close(hard return)". For what ever reason, I cannot upload the file, the upload manager just simply "spins" and does nothing.
 
I checked all of the file locations and have that fixed. this is what I get when I try running the recorded action:
 
Command: ZSC
ZOOM
Specify corner of window, enter a scale factor (nX or nXP), or
[All/Center/Dynamic/Extents/Previous/Scale/Window/Object] : E
Command: QSAVE
Command: SCRIPT
Enter script file name : I:\AutoCAD 2013\CLOSE.SCR File load canceled: I:\AutoCAD 2013\CLOSE.SCR
Command: Playback of action macro complete
 
It looks like the script command has changed some, when I simply type in script, I am presented with a selection window to find and select the file. So trying to record a new action that involves a script is probably not the way to go. however, when I type SCRIPT in the command line, find and select the CLOSE.SCR file this is what I get:
 
Command: SCRIPT
File load canceled: I:\AutoCAD 2013\CLOSE.SCR
 
I copied "CLOSE.SCR" to my desktop, entered SCRIPT into the command line and selected the "CLOSE.SCR" from the desktop and it successfully worked.
 
The problem is why is it canceling the load operation from the I:\AutoCAD 2013 location?
回复

使用道具 举报

3

主题

15

帖子

12

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-7 00:18:52 | 显示全部楼层
Hello!
 
Thank you all for your interest in helping me!
 
I have it figured out, it had to do with the security of "trusted" locations!
 
Unfortunately, I have not figured out how to edit the recorded action file so that I can redirect the file location to simply "I:\AutoCAD Recorded Actions" so that from here on out I wouldn't have to make sure everything went to a 2013 folder, but that is not the worst thing to happen!
 
Thanks again!
回复

使用道具 举报

5

主题

224

帖子

219

银币

初来乍到

Rank: 1

铜币
25
发表于 2022-7-7 00:23:58 | 显示全部楼层
Glad to hear you got it working.
回复

使用道具 举报

YZ

27

主题

232

帖子

205

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
135
发表于 2022-7-7 00:29:31 | 显示全部楼层
Can you edit macros that have been created with the action recorder?
 
If the only thing in the script is a close command, you might then be able to write it in to you macro.  I may have misunderstood your objective, but it would remove a layer of complication.
 
Add this to end of your macro:
  1. Close;
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-7-1 10:36 , Processed in 0.687646 second(s), 73 queries .

© 2020-2025 乐筑天下

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