|
本帖最后由 zhb236623 于 2011-7-20 23:32 编辑
- (defun c:aa(/ n1 wz insertp)
- ;;判断哪个图层是否存在
- (princ"函数功能:输入A1,A2, A3... ")
- (if (= (tblobjname "layer" "JMD") nil)
- (progn
- (princ "图层JMD不存在,新建图层JMD完成,导入数据将存放在JMD层")
- (command ".layer" "n" "JMD" "s" "JMD" "")
- )
- (progn
- (command "layer" "s" "JMD" "")
- (princ "JMD图层已存在,导入数据将存放在JMD层,完成导入")
- )
- );end if
- (if (not (setq n1 (getint "\n请输入起始顺序号 <1>: ")))
- (setq n1 1)
- )
- (setq wz (strcat "A" (itoa n1)))
- (setq insertp (getpoint "\n请指定插入点: "))
- (while (/= insertp nil)
- (command "text" insertp "0.6" "0" wz)
- (setq
- n1 (+ n1 1)
- wz (strcat "A" (itoa n1))
- insertp (getpoint "\n请指定下一插入点: ")
- )
- )
- );end defun
复制代码 |
|