大家好,
我对ARRAYPATH命令和lisp有问题。
似乎使用(命令“_.arraypath”…)与手动使用的命令的行为不同。
我做了很多测试,损失了很多小时的工作,但没有解决问题:-(
实际上,与(命令“_.arraypath”…)相比,手动操作的选项顺序是不同的。
此外,如果手动启动,则在使用(命令“_.arraypath”…)时,选择多段线的位置并不重要结果取决于选择多段线的点。
这里是我写的最后一段代码:
- (defun c:test ()
- (setq oggpoli (car (entsel "\nSelect the polyline: ")))
- (setq oggline (car (entsel "\nSelect the line: ")))
-
- (setq coords (vlax-safearray->list (vlax-variant-value (vla-get-coordinates (vlax-ename->vla-object oggpoli)))))
- (setq pA (list (nth 0 coords) (nth 1 coords)))
- (setq pB (list (nth 2 coords) (nth 3 coords)))
-
- (command "_.arraypath" oggline "" oggpoli "_o" pA pB "_f" "20" "_x")
- )[attachment=44641:name]
我ho provato anche questo codice ma senza risolvere:
- (command-s "_.arraypath" oggline "" (osnap (vall 10 oggpoli) "_nea") "2" "20" "_al" "_y" "_m" "_m" "_i" "_f" "" "")
我附加DWG文件以执行测试;在这个dwg文件中,您可以看到我想要实现的结果。
我希望你能帮助我。。。。
测试。图纸 |