This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def double(num): | |
| """double değer hesaplayan fonksiyon""" | |
| return 2*num | |
| print(double.__doc__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Autolispte arc çizmek için: | |
| ; orta nokta | |
| ; yarıçap | |
| ; başlangıç ve bitiş açıları gerekir | |
| ; Örnek: | |
| (setq yaricap 25) | |
| (setq orta (getpoint "\nBir nokta seçin...:")) | |
| (entmake (list (cons 0 "ARC")(CONS 10 orta)(cons 40 yaricap)(cons 50 (angtof "15"))(cons 51 (angtof "60"))cons 62 3))) | |
| ;Yeşil renkli yaricapi 25, başlangıç açısı 15 bitiş açısı 60 olan seçtiğimiz noktaya göre bir arc yarattık. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Autolispte text ve mtext hizalama | |
| ; text hizalamak için gereken dxf kodları 72 ile 73 iken | |
| ; mtext hizalamak için 71 dxf kodu yeterlidir. | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; Mtext hizalama (71 dxf kodu) | |
| ; 1 üst sol | |
| ; 2 üst orta | |
| ; 3 üst sağ | |
| ; 4 orta sol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Visual Lisp ActiveX methodları | |
| ; Kullanacağımız komutlar: | |
| ; VL-LOAD-COM | |
| ; VLA-PUT | |
| ; VLA-GET | |
| (vl-load-com) | |
| ; visual lisp activeX komutlarını çalıştırmak için önce vl-load-com fonksiyonunu çağırıyoruz | |
| (setq c(car (entsel "\nBir daire seçiniz...:"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Autolispte and ve or operatörleri kullanımı | |
| ; örnek: | |
| ; | |
| ;;;;;;;;;;;;;;;;;;; | |
| ; and kullanımı; | |
| ;;;;;;;;;;;;;;;;;;; | |
| (defun c:enbuyuk() | |
| (setq a(getint "\nİlk sayıyı girin:") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Autolispte alt fonksiyon (subfunctions) örnekleri | |
| ; Normalde ana fonksiyonlar defun c: ile baslarken alt fonksyinolar defun fonksiyon adı ile başlar | |
| ; n!/(n-r)!*r! hesaplayan program örneği | |
| (defun c:anafonksiyon(/ n r faktoriyel1 faktoriyel2 faktoriyel3) | |
| (setq n 5 | |
| r 2 | |
| ) | |
| (setq faktoriyel1 (altfonksiyon n)) | |
| (setq faktoriyel2 (altfonksiyon r)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; mapcar fonksiyonu | |
| ; örnek kullanım | |
| ; (mapcar function list1 list2 ...listn) | |
| (mapcar '1+ (list 10 20 30 40)) | |
| ; listemizdeki her elemana 1 ekler | |
| ; sonuç listemiz 11 21 31 41 olur | |
| ; fonksiyonumuzdan önce tek tırnak kullanmayı unutmuyoruz. | |
| (mapcar '+ (list 1 2 3 4 5) (list 10 20 30 40 50)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Autolispte textleri ve polylineları text ve excele çıkarırken | |
| ; kullanacağımız komutlar | |
| ; OPEN | |
| ; CLOSE | |
| ; WRITE-LINE | |
| ; | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; Autocaddeki yazıları text dosyasına çıkan program örneği | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; color | |
| ; layer | |
| ; line type | |
| ; text height | |
| ; text angle | |
| ; text content | |
| ; | |
| ; Kullanacağımız dxf kodları: | |
| ; COLOR: 62 | |
| ; LINE TYPE: 6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; strcase | |
| ; strlen | |
| ; strcat | |
| ; substr | |
| (strcase "yazi") | |
| ; sonuç YAZI olur | |
| (strcase "YAZI" t) | |
| ; sonuç yazi olur |
NewerOlder