明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1247|回复: 4

HELP

[复制链接]
发表于 2004-2-20 06:58:00 | 显示全部楼层 |阅读模式
(if (/= (vla-get-configname (setq layout (objsel layoutsel "Paper"))) "\\\\CCICAUDIRS2A\\Drawings Printer PS")
(progn
(alert "Current plotter configuration name is not \"Drawings Printer PS\", press ENTER to change...")
(vla-put-configname layout "\\\\CCICAUDIRS2A\\Drawings Printer PS")
);progn
);end-if
That's part of my routine. The problem is sometimes it returns
error: Automation Error. Invalid input
The printer "\\\\CCICAUDIRS2A\\Drawings Printer PS" is definitely in the list
Anybody can tell me what causes the problem and how to traps the error. Many thanks
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2004-2-20 07:58:00 | 显示全部楼层

Specifies the plotter configuration name.

Signature

object.ConfigName

object Layout, PlotConfiguration

The object or objects this property applies to.

ConfigName String; read-write

The name of the PC3 file or print device to be used by the layout or plot configuration.

Remarks

This property does not take a fully qualified path, only the file name for the configuration file. Use the PrinterConfigPath property to specify the path for printer configuration files.

Specifies the location for printer configuration files.

Signature

object.PrinterConfigPath

object PreferencesFiles

The object or objects this property applies to.

PrinterConfigPath String; read-write

The drive and path for printer configuration files.

Remarks

Use a semicolon (;) to separate multiple directories; however, do not end the string with a semicolon.

 楼主| 发表于 2004-2-20 08:22:00 | 显示全部楼层
I am quite sure the following sentence cause the problem (vla-put-configname layout "\\\\CCICAUDIRS2A\\Drawings Printer PS") It do work properly in many cases. And it also failed sometimes.
The printer "\\\\CCICAUDIRS2A\\Drawings Printer PS" is in the plot device list. But just can not be indentified.
Can you help me catch the error and prompt the user to change the plot device manually?
 楼主| 发表于 2004-2-20 08:40:00 | 显示全部楼层
I would like to dicribe the error in more detail Please get my complete LISP file... This error only happens when I just start a new AutoCAD session and before the first actually plotting opertion
It seems the first plotting operation will load something that make the vla-put-configname applicable.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2004-2-20 09:19:00 | 显示全部楼层
you can use (vl-catch-all-apply) to catch the error
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-27 16:37 , Processed in 0.178775 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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