谢谢 不客气。 更新为正确的UCS 你是否对UCS进行了另一次更新?
是,允许正常值的变化。 啊,好的。
...... 在处理奇数方向的插入时,技术组合是否更可靠?见所附示例。
请原谅我之前发布的混合和匹配代码。
(defun c:AtInsert2 ( / obj )
(if
(setq obj
(SelectifFoo
(lambda ( x )
(if
(vlax-property-available-p
(setq x (vlax-ename->vla-object x)) 'InsertionPoint
)
x
)
)
"\nSelect Object: "
)
)
(command "_.line" "_non"(trans (vlax-get obj 'InsertionPoint) 0 1))
)
)
(defun SelectifFoo ( foo str / sel x )
(while
(progn
(setq sel (entsel str))
(cond
(
(vl-consp sel)
(if (not (setq x (foo (car sel))))
(princ "\n** Invalid Object Selected **")
)
)
)
)
)
x
)
插入。图纸 让我们把它混合得更多。。。
(defun c:AtInsert3 (/ obj)
(if
(setq obj
(SelectifFoo
(lambda (x)
(if
(vlax-property-available-p
(setq x (vlax-ename->vla-object x))
'InsertionPoint
)
x
)
)
"\nSelect Object: "
)
)
;; AJT begin edit
((lambda (ins)
(if (eq 1 (logand 1 (getvar 'cmdactive)))
ins
(command "_.line" "_non" ins)
)
)
(trans (vlax-get obj 'InsertionPoint) 0 1)
)
;; AJT end edit
)
)
(defun SelectifFoo (foo str / sel x)
(while
(progn
(setq sel (entsel str))
(cond
(
(vl-consp sel)
(if (not (setq x (foo (car sel))))
(princ "\n** Invalid Object Selected **")
)
)
)
)
)
x
)
这是迄今为止最好的代码!!!我们就快到了!!当选取一个属性来开始这条线时,它实际上是从块的插入点开始的,现在,如果第二个点或线的端点也可以从另一个属性中选取(而不是输入“AtInsert3”),我们将得到我想要的解决方案!然后继续行到下一个属性等。。。。。
太棒了,艾伦!!!
S (defun c:AtInsert3 (/ obj)
(if
(setq obj
(SelectifFoo
(lambda (x)
(if
(vlax-property-available-p
(setq x (vlax-ename->vla-object x))
'InsertionPoint
)
x
)
)
"\nSelect Object: "
)
)
;; AJT begin edit
((lambda (ins)
(if (eq 1 (logand 1 (getvar 'cmdactive)))
ins
(command "_.line" "_non" ins "_non" (c:ATInsert3))
)
)
(trans (vlax-get obj 'InsertionPoint) 0 1)
)
;; AJT end edit
)
)
(defun SelectifFoo (foo str / sel x)
(while
(progn
(setq sel (entsel str))
(cond
(
(vl-consp sel)
(if (not (setq x (foo (car sel))))
(princ "\n** Invalid Object Selected **")
)
)
)
)
)
x
)
当然,如果这就是你想要的,这可以简单得多。
页:
1
[2]