本帖最后由 Andyhon 于 2012-7-22 09:53 编辑
- (defun c:asd ()
- (command "undo" "be")
- (setvar 'cmdecho 0)
- (setvar 'osmode 16383)
- (setq en (car (entsel "\n选择多段线:")))
- (setq p1 (getpoint "\n选择切入点: "))
- (setq fx (getint "\n选择方向 ([1]顺时针,[2]逆时针) <1>: "))
- (if (= nil fx)
- (setq fx 1)
- )
- (if (WCMATCH (cdr (assoc 0 (entget en))) "*POLYLINE")
- (progn
- (yytm)
- (if (/= fx fang)
- (VxRevPline obj)
- )
- (setq pt (vlax-curve-getClosestPointTo
- (vlax-ename->vla-object en)
- p1
- )
- )
- (abhk)
- (gjus_ent)
- )
- )
- (command "undo" "e")
- (princ)
- )
- ;;; or ==================================
- (defun c:asd ()
- (command "undo" "be")
- (setvar 'cmdecho 0)
- (setvar 'osmode 16383)
-
- (prompt "\n选择多段线:")
-
- (if (setq en (ssget ":E:S" '((0 . "*POLYLINE"))))
- (progn
- (setq en (ssname en 0)
- p1 (getpoint "\n选择切入点: ")
- fx (getint "\n选择方向 ([1]顺时针,[2]逆时针) <1>: ")
- )
-
- (if (= nil fx)
- (setq fx 1)
- )
-
- (yytm)
-
- (if (/= fx fang)
- (VxRevPline obj)
- )
- (setq pt (vlax-curve-getClosestPointTo
- (vlax-ename->vla-object en)
- p1
- )
- )
- (abhk)
- (gjus_ent)
- ) )
- (command "undo" "e")
- (princ)
- )
依 Test.Dwg 未见您所述 画不出来 的情形
请个别另行指出 |