08-25-2019
12:51 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
08-25-2019
12:51 AM
hi,
are anybody can convert this lisp to 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 "\nFirst Point:"))
(progn
(while dd
(if (setq p2 (getpoint p1 "\nOther Point:"))
(progn
(setq ss (ssget "c" p2 p2))
(ifss
(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))
(setq p1 nk2)
)
(progn
(setq dd nil)
)
)
)
)
)
(princ)
)
¡Resuelto! Ir a solución.
08-25-2019
01:57 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
08-25-2019
01:57 AM
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
Etiquette and Ground Rules of Autodesk Community
08-25-2019
02:08 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
08-25-2019
02:08 AM
Thank you so much. Can we change this lisp a little?
If an object opposite of my direction that is working true but if nothing opposite of direction it is not working what I want. Can we can this for mouse actions to select offset side?
08-25-2019
12:02 PM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
08-25-2019
12:02 PM
>>>>If an object opposite of my direction that is working true
On my side the routine doesn't work correctly in any direction - it doesn't create lines parallel to existing with 5 units offset (red lines are the resulting lines):
Or I'm missing something?
Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.
Maxim Kanaev
Architect
MARSS
Etiquette and Ground Rules of Autodesk Community