明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: 669423907

[源码] 两个程序有冲突,该如何改?

[复制链接]
 楼主| 发表于 2013-5-4 12:04:04 | 显示全部楼层
ll_j 发表于 2013-5-4 10:29
把(defun c:q3(/ *error* ent gr i msg n qf ss s1)改成(defun c:q3(/ ent gr i msg n qf s1)试试。

还是不行吖!!!

需要点或选项关键字。
; 错误: *error* 函数中出错AutoCAD 变量设置被拒绝: "qaflags" nil
指定修改点或 [特性(P)]:
 楼主| 发表于 2013-5-6 20:06:46 | 显示全部楼层
终于,这样可以了

(defun c:1()
(setq ss (ssget"i"))
(if (= ss nil)(1,)(1,,)))

(defun 1,()
(command "layer" "m" "0" "c" "253" "" "lw" "0.3" "" ""))

(defun 1,,()
(setq ss (ssget))
(setq la (getvar"clayer"))
(command "layer" "m" "0" "c" "253" "" "lw" "0.3" "" "" "clayer" la)
(command "change" ss "" "P" "la" "0" "c" "byl" "lw" "byl" "lt" "byl" ""))
发表于 2016-1-15 18:13:53 | 显示全部楼层
本帖最后由 布朗运动 于 2016-1-15 18:15 编辑
669423907 发表于 2013-5-6 20:06
终于,这样可以了

(defun c:1()

(defun c:1()
(setvar "cmdecho" 0)       ;增加这个试试看
(setq ss (ssget"i"))
(if (= ss nil)
(command "layer" "m" "0" "c" "253" "" "lw" "0.3" "" "")
(command "change" ss "" "p" "la" "0" "c" "byl" "lw" "byl" "lt" "byl" "")))
参见:http://bbs.mjtd.com/forum.php?mod=viewthread&tid=95050,xyz2009xyz的回答。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-5-20 20:25 , Processed in 0.171521 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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