Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

maxim_k
en respuesta a: bedyr

Here it is, "converted" for Mac:

(defun c:PF (/ dd mm p1 p2 is nk1 nk2)
  (setq dd t)
  (setq mm 5)
  ;(setq obj (vlax-get-acad-object))
  ;(setq doc (vla-get-ActiveDocument obj))
  ;(setq ms (vla-get-ModelSpace doc))
  (if (setq p1 (getpoint "\nFirstPoint:"))
    (progn
      (while dd
	(if (setq p2 (getpoint p1 "\nOtherPoint:"))
	  (progn
	    (setq ss (ssget "c" p2 p2))
	    (if	ss
	      (setq is -)
	      (setq is +)
	    )
	    (setq nk1 p1
		  nk2 (polar p1 (angle p1 p2) (is (distance p1 p2) mm))
	    )
	    ;(vla-addline ms (vlax-3d-point nk1) (vlax-3d-point nk2))
	    (command "LINE" nk1 nk2 "")
	    (setq p1 nk2)
	  )
	  (progn
	    (setq dd nil)
	  )
	)
      )
    )
  )
  (princ)
)

But I'm not sure this routine (even in "AC for Windows" variant) will give you results you need.

 


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community