乐筑天下

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

saveman.vba problem.

[复制链接]

19

主题

97

帖子

4

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
179
发表于 2004-8-4 06:34:55 | 显示全部楼层 |阅读模式
I downloaded this from the afralisp website but when I try to run it I get an error message stating
compile error:
case without select case.
can anyone fix this as this is a much better solution than the Autocad autosave function.
  1. ' 15 Then
  2. 'save the drawing
  3. ThisDrawing.Save
  4. 'and then reset Useri2
  5. ThisDrawing.SetVariable ("Useri2"), NewTime
  6. End If
  7. ' end of the Select
  8. End Select
  9. End
  10. End Sub
  11. 'End Coding Here-->

Cheers
Andy
回复

使用道具 举报

19

主题

97

帖子

4

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
179
发表于 2004-8-4 12:17:55 | 显示全部楼层
brilliant, cheers mate
回复

使用道具 举报

3

主题

70

帖子

3

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
100
发表于 2004-8-4 13:12:26 | 显示全部楼层
OK... this is something I've just been asking about in CAD General....so you guys gotta help this old fool out.
Got this from Afralisp:

What's a "module" and where do I find it?
Once I insert the origional and Jeffs fix, I need to save it to my acad path and load it similar to a lisp routine....right?  If I want to change the prompts that activate it, I edit this part: ...So far so good.  To change the time difference.....edit: ....Now does this part ...  save to the current dir as a "*.save" file??? Lost again....  Enough for now.  Thanks fellas.
回复

使用道具 举报

71

主题

928

帖子

8

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1230
发表于 2004-8-4 15:49:01 | 显示全部楼层

What's a "module" and where do I find it?A Module is a portion of the dvb file....In ACAD type VBAMAN, select the New button, then select the Visual Basic Editor button to put you in the editor. Now make sure that the new dvb you just created is highlighted in the left pane, go to the "Insert" menu, select "Module" and you will now have a new Module1 in your dvb. Right click the new module and select "View Code". Now you can place the cursor in the module's code window and paste the code.
Once I insert the origional and Jeffs fix, I need to save it to my acad path and load it similar to a lisp routine....right? Yes & No.....As was suggested, place in the startup suite to load with eash acad session. If I want to change the prompts that activate it, I edit this part: ...So far so good.  To change the time difference.....edit: Correct!....Now does this part ...  save to the current dir as a "*.save" file??? No, this just saves the drawing as if you typed "qsave" at the command line.Lost again....  Enough for now.  Thanks fellas.To save as a different name you'd use the "SaveAs" method which is a little more detailed....path, name, & version must be supplied.
Hope that clears it up a bit,
Jeff
回复

使用道具 举报

3

主题

70

帖子

3

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
100
发表于 2004-8-4 16:11:35 | 显示全部楼层
Thjanks Jeff. That's a big help.  Soon as I get a chance, I'll try this out and let you know how bad I screwed up..... The "thisDrawing.Save" thing threw me. I want it to save as a standard .bak....not a save-as.  As for loading the routine, I always place my "good'ns" in the startup suite.....
回复

使用道具 举报

19

主题

97

帖子

4

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
179
发表于 2004-8-5 03:48:28 | 显示全部楼层
So whats the solution to the saveas dilema, as this would be a better solution.
I'd rather the drawing savedas to a temp directory rather than overwrite the master drawing, as sometimes I'm only copying from the drawing, or doing some hypothetical editing and don't really want to alter it.
回复

使用道具 举报

1

主题

18

帖子

7

银币

初来乍到

Rank: 1

铜币
16
发表于 2004-8-19 23:30:29 | 显示全部楼层
Remember...this would be the same as if you selected SAVEAS from the FILE menu......Are you sure you want to do this ??
回复

使用道具 举报

18

主题

222

帖子

51

银币

后起之秀

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

铜币
260
发表于 2004-8-20 03:39:38 | 显示全部楼层

ehmn.. exactly what is the saveas dielmna  ?
Autocad in reality does save the drawing to a "temp" directory ~ when you "open" a drawing, Autocad actually creates a copy of the original, then places a lock on the original drawing file so it can't be "edited". When you carry out a save, it deletes the original, replaces it with a copy of the drawing you are actually working on and goes through the process again.
When I think on it, it may not replace the original until you physically close the drawing, but I'm not sure on that point. ~ Anyone use the Revert command ? does it open the drawing as the original or does it only open the drawing back to the last save command ? aha, I just checked ~ it only opens the drawing back to the last save command.
So, everytime you issue a save command, it replaces the original and creates another "copy" for you to work on. simple, no ?
what was the question again ?
回复

使用道具 举报

19

主题

97

帖子

4

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
179
发表于 2004-8-20 03:52:28 | 显示全部楼层
The save as dilema is
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-7-1 03:16 , Processed in 1.209306 second(s), 71 queries .

© 2020-2025 乐筑天下

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