17.08.2015 05:48    

tekinkaya
obje snap yakalama seçeneklerinin hepsi işaretli iken.
lispi çalıştırıyorum obje snap yakalama seçeneklerinin hepsinin işarettini kaldırıyor ve imleç yakalama noktası bulamıyor.
lispin obje snap yakalama seçeneklerini bozmaması için ne yapılmalıdır.

17.08.2015 06:19    

alumina
(getvar "osmode" osm)
.
.
.
.
(setvar "osmode" osm)

17.08.2015 19:42    

tekinkaya
Teşekkürler

18.08.2015 09:35    

tekinkaya
setvar ve getvar bölümlerini yukarıdaki gibi değiştirdim olmadı tam olarak lisp kodlarından nereleri değiştirmem gerekiyor.

(defun yardimcilar ()
(command "osnap" "none" "")
(setvar "cmdecho" 0)
(setvar "blipmode" 0)
(command "ortho" "on" "")
(command "layer" "m" "aks" "c" "3" "" "l" "dashdotx2" "" "" "")
(command "layer" "m" "aks" "c" "3" "" "")
(command "layer" "m" "yazi1" "c" "7" "" "")
(command "layer" "m" "yazi1" "c" "7" "" ""))
(defun yardimcilar2 (bVerOrHor / p1 p2)
(command "osnap" "end" "")
(setq p1 (getpoint "\nbirinci noktayi giriniz: "))
(command "osnap" "none" "")
(command "osnap" "per" "")
(setq p2 (getpoint p1 "\nbirinci noktayi giriniz: "))
(if (eq bVerOrHor nil )
(setq p2 (list (car p1) (cadr p2) (caddr p2)))
(setq p2 (list (car p2) (cadr p1) (caddr p2)))
)
(command "osnap" "none" "")
(setq dAci (angle p1 p2))
(command "layer" "s" "aks" "")
(command "line" p1 p2 "")
(command "layer" "s" "aks" "")
(command "line" p1 (polar p1 (+ dAci 0.0) -200.0) "")
(command "line" p2 (polar p2 dAci 200.0) "")
(command "layer" "s" "yazi1" "" )
(command "circle"
(polar p1 (+ dAci pi) 215.0)
(polar p1 (+ dAci pi) 230.0)
)
(command "circle" (polar p2 dAci 215.0) (polar p2 dAci 230.0))
(command "layer" "s" "yazi1" "")
(command "text" "st" "standard" "j" "mc" (polar p2 dAci 215.0) 18.0 0 (itoa isim))
(command "text" "st" "standard" "j" "mc" (polar p1 (+ dAci pi) 215.0) 18.0 0 (itoa isim))
(list p1 p2)
)
(defun c:a1 ()
(setq isim 1 )
(command "undo" "begin")
(setvar "cmdecho" 0)
(setq nOsmode(getvar "OSMODE" ))
(setq szCLayer (getvar "CLAYER"))
(yardimcilar)
(setq ptList (yardimcilar2 nil))
(setq p1 (car ptList) p2 (cadr ptList)
p11 p1
p22 p2
)
(setvar "highlight" 0)
(while (and (/= p11 nil) (/= p22 nil))
(if (not ara1)
(setq ara1 1.0)
)
(setvar "OSMODE" nOsmode)
(setq
p2 (getpoint p1
(strcat "\naks aralıgını gırınız <" (rtos ara1) ">: ")
)
)
(setvar "OSMODE" 0)
(if (numberp p2)
(setq ara p2 ara1 ara)
(setq ara (- (car p2) (car p1)) ara1 ara)
)
(setq p1n (polar p11 0 ara))
(setq p2n (polar p22 0 ara))
(command "layer" "s" "aks" "")
(command "line" p1n p2n "" "")
(command "layer" "s" "aks" "" )
(command "line" p1n (polar p1n (+ dAci 0.0) -200.0) "")
(command "line" p2n (polar p2n dAci 200.0) "")
(command "layer" "s" "yazi1" "")
(command "circle"
(polar p1n (+ dAci pi) 215.0)
(polar p1n (+ dAci pi) 230.0)
""
)
(command "circle"
(polar p2n dAci 215.0)
(polar p2n dAci 230.0)
""
)
(setq isim (1+ isim))
(command "layer" "s" "yazi1" "" )
(command "text" "st" "standard" "j" "mc" (polar p2n dAci 215.0) 18.0 0 (itoa isim))
(command "text" "st" "standard" "j" "mc" (polar p1n (+ dAci pi) 215.0) 18.0 0 (itoa isim))
(command "layer" "s" "duvar" "" )
(setq p11 p1n)
(setq p22 p2n)
(setq p1 (list (car p2) (cadr p1) (caddr p1)))
)
(setvar "highlight" 1)
(setvar "OSMODE" nOsmode)
(setvar "cmdecho" 1)
(setvar "CLAYER" szClayer)
(command "_undo" "end")
(princ)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun yardimcilar ()
(command "osnap" "none" "")
(setvar "cmdecho" 0)
(setvar "blipmode" 0)
(command "ortho" "on" "")
(command "layer" "m" "aks" "c" "68" "" "l" "dashdotx2" "" "" "")
(command "layer" "m" "aks" "c" "3" "" "")
(command "layer" "m" "yazi1" "c" "7" "" "")
(command "layer" "m" "yazi1" "c" "7" "" ""))
(defun yardimcilar1 (bVerOrHor / p1 p2)
(command "osnap" "end" "")
(setq p1 (getpoint "\nbirinci noktayi giriniz: "))
(command "osnap" "none" "")
(command "osnap" "per" "")
(setq p2 (getpoint p1 "\nbirinci noktayi giriniz: "))
(if (eq bVerOrHor nil )
(setq p2 (list (car p1) (cadr p2) (caddr p2)))
(setq p2 (list (car p2) (cadr p1) (caddr p2)))
)
(command "osnap" "none" "")
(setq dAci (angle p1 p2))
(command "layer" "s" "aks" "")
(command "line" p1 p2 "")
(command "layer" "s" "aks" "")
(command "line" p1 (polar p1 (+ dAci 0.0) -200.0) "")
(command "line" p2 (polar p2 dAci 200.0) "")
(command "layer" "s" "yazi1" "" )
(command "circle"
(polar p1 (+ dAci pi) 215.0)
(polar p1 (+ dAci pi) 230.0)
)
(command "circle" (polar p2 dAci 215.0) (polar p2 dAci 230.0))
(command "layer" "s" "yazi1" "")
(command "text" "st" "standard" "j" "mc"(polar p2 dAci 215.0) 18.0 0 (chr isim))
(command "text" "st" "standard" "j" "mc"
(polar p1 (+ dAci pi) 215.0)
18.0 0
(chr isim)
)
(list p1 p2)
)
(defun c:a2 ()
(setq isim 65)
(command "undo" "begin")
(setvar "cmdecho" 0)
(setq nOsmode(getvar "OSMODE" ))
(setq szCLayer (getvar "CLAYER"))
(yardimcilar)
(setq ptList (yardimcilar1 t))
(setq p1 (car ptList) p2 (cadr ptList)
p11 p1
p22 p2
)
(while (and (/= p11 nil) (/= p22 nil))
(if (not ara1)
(setq ara1 1.0)
)
(setvar "OSMODE" nOsmode)
(setq
p2 (getpoint p1
(strcat "\naks aralıgını gırınız <" (rtos ara1) ">: ")
)
)
(setvar "OSMODE" 0)
(if (numberp p2)
(setq ara p2 ara1 ara)
(setq ara (- (cadr p2) (cadr p1)) ara1 ara)
)
(setq p1n (polar p11 1.57143 ara))
(setq p2n (polar p22 1.57143 ara))
(command "layer" "s" "aks" "")
(command "line" p1n p2n "" "")
(command "layer" "s" "aks" "" )
(command "line" p1n (polar p1n (+ dAci 0.0) -200.0) "")
(command "line" p2n (polar p2n dAci 200.0) "")
(command "layer" "s" "yazi1" "")
(command "circle"
(polar p1n (+ dAci pi) 215.0)
(polar p1n (+ dAci pi) 230.0)
""
)
(command "circle"
(polar p2n dAci 215.0)
(polar p2n dAci 230.0)
""
)
(setq isim (1+ isim))
(command "layer" "s" "yazi1" "" )
(command "text" "st" "standard" "j" "mc"(polar p2n dAci 215.0) 18.0 0 (chr isim))
(command "text" "st" "standard" "j" "mc"
(polar p1n (+ dAci pi) 215.0)
18.0 0
(chr isim)
)
(command "layer" "s" "duvar" "" )
(setq p11 p1n)
(setq p22 p2n)
(setq p1 (list (car p1) (cadr p2) (caddr p1)))
)
(setvar "OSMODE" nOsmode)
(setvar "cmdecho" 1)
(setvar "CLAYER" szClayer)
(command "_undo" "end")
)

25.08.2015 09:30    

tekinkaya
şimdi sonuç olarak bu lispi çalıştırınca osnap ayarlarına müdahele etmemesi için yukarıda verdiğim lispte nereleri değiştirmem gerekiyor

25.08.2015 13:01    

özkan-wien
alumina yazmis iste;

Lisp baslayinca halihazirdaki osmodeyi kaydededeceksin
(defun c:.......
(getvar "osmode" osm)

lispin sonunda tekrar ayni ayarlari yükleyeceksin
(setvar "osmode" osm)
)

tabi lispe baslarken osmode 0 ise onu kaydedip Lisp bitince 0 i yükleyecektir

14.09.2015 14:38    

halilozcakir
bişey daha öğrenmiş olduk eyvallah üstadlar sağolun..

> 1 <
Copyright © 2004-2022 SQL: 0.98 saniye - Sorgu: 59 - Ortalama: 0.01661 saniye