Documente Academic
Documente Profesional
Documente Cultură
Kadangkala ketika kita bekerja, mencari kalender meja ataupun dinding sangat susah, mungkin anda
belum punya atau memang belum tersedia, dengan program Autolisp adalah solusinya.
[sourcecode language='cpp']
;CADENCE
;modified for international versions of AutoCAD (^v^) CAD Studio sro
;www.cadstudio.cz
(defun CALENDAR (/ mn dy cd cel ar crx cry qu
d c y m ox oy xcl ycl am nd cc loc m0 y0)
; Initial settings and definition of constants.
(setvar CMDECHO 0)
(setvar BLIPMODE 0)
(setvar OSMODE 0)
(setq mn (JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY
AUGUST SEPTEMBER OCTOBER NOVEMBER DECEMBER)
dy (31 28 31 30 31 30 31 31 30 31 30 31)
cd (1 4 4 0 2 5 0 3 6 1 4 6))
(setq cel 1.5 ; Cell size
ar 0.8333 ; Aspect Ratio [to fit into A-size sheet]
crx 0.0 ; lower-left hand Corner Reference
cry 0.0
qu 1) ; QUadrant [0=centered, 1=lower right]
(command _.Style TXA romant 0.75 ) ; for characters
(command _.Style TXB romans 0.75 ) ; for numbers
(setq d (rtos (getvar CDATE) 2 0) ; get system date,
c (atoi (substr d 1 2)) ; century,
y (atoi (substr d 3 2)) ; year and
m (atoi (substr d 5 2)) ; month
xcl cel ; Cell size X
ycl (* ar xcl) ; Cell size Y
am (strcat (nth (1- m) mn) (substr d 1 4)) ; set month string,
nd (nth (1- m) dy) ; number of days &
cc (+ (nth (1- m) cd) (- 19 c))) ; month code.
(princ Generating calendar for ) (princ am)
(princ , please wait . .)
; CALDRAW returns the day-of-the-week and location of the last date.
(setq loc (caldraw qu 0 crx cry xcl ycl m y am nd cc))
; To generate mini calendars for the previous and next months.
(if (or (zerop (car loc)) (> (car loc) 2))
(if (< (cadr loc) (+ crx (* xcl 5.0)))
(setq ox (+ crx (* xcl 5.0))
oy (+ cry (* ycl 0.05)))
(setq ox crx
oy (+ cry (* ycl 4.05))))
(if (< (caddr loc) (+ cry ycl))
(setq ox (+ crx (* xcl 5.0))
oy (+ cry (* ycl 0.05)))
(setq ox (+ crx (* xcl (+ (car loc) 1)))
oy (+ cry (* ycl 4.05)))))
(setq xcl (/ xcl 7.0) ; Cell size - X
ycl (* ar xcl)) ; Cell size - Y
; For the previous month:
(if (= m 1) ; wrap around if January
(setq m0 12 y0 (1- y))
(setq m0 (1- m) y0 y))
(setq am (nth (1- m0) mn) ; set month string,
nd (nth (1- m0) dy) ; number of days and
cc (+ (- 19 c) (nth (1- m0) cd))) ; month code.
(if (minusp y0) (setq y0 99 cc (1+ cc))) ; change of century
(CALDRAW 0 1 ox oy xcl ycl m0 y0 am nd cc)
; For the next month:
(setq ox (+ ox (* xcl 7.0)))
(if (= m 12) ; wrap around if December
(setq m0 1 y0 (1+ y))
(setq m0 (1+ m) y0 y))
(setq am (nth (1- m0) mn) ; set month string,
nd (nth (1- m0) dy) ; number of days and
cc (+ (nth (1- m0) cd) (- 19 c))) ; month code.
(if (> y0 99) (setq y0 0 cc (1- cc))) ; change of century
(CALDRAW 0 1 ox oy xcl ycl m0 y0 am nd cc)
(command _.Zoom _E)
(princ . complete.n Save the drawing and use PRPLOT or PLOT.n)
(princ nCALENDAR from As Computing Expertise (609) 772-1309n)
(princ)
)
; This function actually generates the calendar.
(defun CALDRAW (qflg dflg xo yo xcl ycl mn yr am nd cc
/ WK dw cfx cfy ta re te x y ht i)
(setq WK (SUN MON TUE WED THU FRI SAT))
(if (and (= mn 2) (zerop (rem yr 4))) (setq nd 29)) ; leap year corrections
(if (and (zerop (rem yr 4)) (or (= mn 1) (= mn 2)))
(setq cc (1- cc)))
; Compute the day of the week for the 1st; 1=Sun, 0,7=Sat.
(setq dw (rem (+ yr (/ yr 4) 1 cc) 7))
(if (zerop dw) (setq dw 7))
Membuat barcode
Barcode sangat berguna untuk mengindentifikasi hasil produk, tetapi tidak sederhana membuat tulisan
barcode, dengan program ini, adalah pemecahannya.
[sourcecode language='cpp']
;AutoCAD bar code utility
;unknown origin, globalization by Xanadu.cz
(defun makebarsupc (txt)
(setq txt (getcodeupc txt)
cnt 1)
(repeat 7
(setq digit (substr txt cnt 1))
(cond
((and (= codetype 1)
(= digit 0)
)
(moveover)
)
((and (= codetype 1)
(= digit 1)
)
(putline)
)
((= digit 1) (moveover))
((= digit 0) (putline))
)
(setq cnt (1+ cnt))
)
)
(defun getcodeupc (txt)
(cond
((= txt 0) (setq txt 0001101))
((= txt 1) (setq txt 0011001))
((= txt 2) (setq txt 0010011))
((= txt 3) (setq txt 0111101))
((= txt 4) (setq txt 0100011))
((= txt 5) (setq txt 0110001))
((= txt 6) (setq txt 0101111))
((= txt 7) (setq txt 0111011))
((= txt 8) (setq txt 0110111))
ht ht2
codetype 2
num2 (rtos num2 2 0)
numcnt 1)
(while (< (strlen num2) 5)
(setq num2 (strcat "0" num2))
)
(repeat 5
(makebarsupc (substr num2 numcnt 1))
(setq numcnt (1+ numcnt))
)
(setq ht ht1
sp (polar sp (+ pi a2) (* 4 wid)))
(setq txpt4 (polar (polar sp (+ a2 pi) (* 3 wid)) (+ pi a1) wid))
(getchecknum)
(makebarsupc checknum)
(putline)
(moveover)
(putline)
(command "_text" "_j" "_f" txpt1 txpt2 (* 6 wid) num1)
(command "_text" "_j" "_f" txpt3 txpt4 (* 6 wid) num2)
(command "_text" (polar (polar sp (+ a2 pi) (* 3 wid)) a1 (* 2 wid)) (* 6 wid) a1
checknum
)
)
[/sourcecode]
Mendengarkan musik
Ketika anda bekerja di depan monitor selama berjam-jam, ini akan membuat diri anda menjadi bosan dan
jenuh, konsentrasi akan semakin berkurang, hasil pekerjaan menjadi tidak karuan, ketelitian gambar
taruhannya, sebaiknya anda mulai alihkan kejenuhan anda untuk mendengarkan musik, kesayangan
anda.
Rubahlah variabel file , dimana kumpulan lagu-lagu kesayangan anda disimpan, selamat mencoba.
[sourcecode language='cpp']
; pwva is stand for Play Winamp Via Autolisp
;
Design by : Adesu
;
Email
: mteybid@yuasabattery.co.id
;
Homepage : http://www.yuasa-battery.co.id
;
Create : 07 February 2007
;
Program no.: 0527/02/2007
;
Edit by : Adesu 08/02/2007 1).
;
19/02/2007 2).
)
; if
(princ)
)
[/sourcecode]