johnpieter 发表于 2022-7-6 09:27:10

组合_dimlinear和UCS

任何身体帮助。。下面介绍如何将这两个命令结合起来。。我想把这个“Ucs”“e”和“u dimlinear”结合起来
命令发出后,its应要求选择对象更改UCS位置,然后自动更改其需要的线性。。没有给出dimlinear命令。。
 
(DEFUN C:测试()
(命令“ucs”“e”)
(命令“_dimlinear”)
(普林斯)
)

Tharwat 发表于 2022-7-6 09:35:29

检查
 
(defun c:test (/ ss)
(if (setq ss (entsel "\n Select One object :"))
   (progn
   (command "_.ucs" "_e" ss )
   (command "_.dimlinear" "" ss pause ))
   (princ)
   )
(princ)
)

 
塔瓦特

MSasu 发表于 2022-7-6 09:40:39

我只是想知道,DIMALIGN或DIMLINEAR with Rotated选项是否适合您的需要?
 
当做
米尔恰

Tharwat 发表于 2022-7-6 09:43:33

我想最需要的是将ucs移动到具有维度的选定实体。
 
当做

johnpieter 发表于 2022-7-6 09:49:34

谢谢你的回复。。。照此看来,它工作得很好。实际上,根据该ucs,其放置相同的尺寸文本位置。但通常我们是为一条斜率线做尺寸标注!根据Ucs选择的方式(行顶部表示一个位置行底部表示暗文本是另一个位置)将出现。但根据这段代码,文本的颜色是相同的。根据ucs选择,应考虑。。你能帮忙吗
 
(定义c:测试(/ss)
(如果(setq ss(entsel“\n选择一个对象:”))
(程序
(命令“.ucs”“\u e”ss)
(命令“_.dimlinear”ss pause))
(普林斯)
)
(普林斯)
)

Tharwat 发表于 2022-7-6 09:53:35

将ucs定位在所选线路上的好处是什么?

johnpieter 发表于 2022-7-6 09:58:14

 
 
即根据该线位置(角度)的尺寸。Ucs位置(根据直线)更改后,我希望使用dimlinear方法进行尺寸标注。

Tharwat 发表于 2022-7-6 10:03:08

将ucs更改为与图元成特定角度时,将导致下一个图元尺寸相应旋转。
 
所以事情会被随机搞混。这将导致维度远离选定图元。

Tharwat 发表于 2022-7-6 10:04:28

这可能会帮助你实现你的目标。
 
(defun c:test (/ ss e p1 p2 ent)
; Tharwat 14. 05. 2011
(if (and (setq ss (entsel "\n Select One Line :"))
          (eq (cdr (assoc 0 (setq e (entget (car ss))))) "LINE")
   )
   (progn
   (if (> (car (setq p1 (cdr (assoc 10 e))))
            (car (setq p2 (cdr (assoc 11 e))))
         )
       (progn
         (setq ent (entmakex
                     (list (cons 0 "LINE") (cons 10 p2) (cons 11 p1))
                   )
         )
         (command "_.matchprop" ss ent "")
         (command "_.ucs" "_e" ent)
         (command "_.dimlinear" "" ss pause)
         (entdel (car ss))
       )
       (progn
         (command "_.ucs" "_e" ss)
         (command "_.dimlinear" "" ss pause)
       )
   )
   )
   (princ "\n Please select line only")
)
(princ)
)

 
塔瓦特

johnpieter 发表于 2022-7-6 10:11:55

萨尔瓦特
根据这个代码有什么区别?我试过这个。。变暗文本到达相同位置(角度)。
页: [1] 2
查看完整版本: 组合_dimlinear和UCS