你好
就我个人而言,我不喜欢混合脚本和LISP例程。只是感觉。。。错误的所以我想出了一个解决办法。我的代码包含在NDA中,因此我无法为您发布,但我会为您提供在没有脚本的情况下执行所需的步骤。
- <br>I. Create a routine to run from drawing1.<br> a. Create a list of routines to run. <br> b. Create a list of work drawings for processing.<br> c. Place the routines list in the vlisp blackboard.<br> d. Open the first work drawing in list.<br> 1. Drawing1 lisp processing is suspended.<br> 2. Startup routine in acad20xxdoc.lsp begins.<br> 3. See Section II<br> e. Save and Close current work drawing.<br> f. Back to step d and open next work drawing in list.<br>II. Create startup routine for acad20xxdoc.lsp<br> a. Check vlisp blackboard for routines list.<br> 1. If there load the first routine.<br> 2. Otherwise normal startup<br> b. Execute the routine. <br> 1. This is the actual work you want done to the drawings.<br> 2. See section III<br> c. Repeat from step a for all routines in list.<br> d. Do not set the work drawing as active.<br> 1. Opening a drawing is different from making it active.<br> 2. When made active, control will not return to drawing1.<br> 3. Inactive drawings will execute all startup routines then hand control back to the last active drawing.<br>III. Create the routines to make your drawing changes.<br> a. Can be any routine that does not require user input.<br>
这将运行任何不需要命令行输入的例程。在所有启动例程完成之前,命令行不可用。这意味着没有GetString或其他命令行用户输入。如果您最终需要用户输入,则必须制作DCL才能获得它。
如果你有任何问题,请告诉我,我会尽力帮助你。
祝你过得愉快。
肖恩多
[/code] |