(Piping Isometric)Rolling Offset Dimension

Dalam Kategori: AutoLISP
23 June 2009, 4:23 pm | oleh: udaaf | 0 Komentar | 309 views

Mungkin sedikit coding ini bisa membantu kawan-kawan yang bekerja di Piping Isometric. Mungkin dah saatnya juga untuk ngasih kalkulatornya buat adek dirumah atau di sumbangin.

Berikut ilustrasi gambar dan coding. Mudah-mudah bisa membantu

Rolling Offset Dimension


(prompt "nKetik ROD untuk menjalankan program:")
;ROD = Rolling Offset Dimension
;Dibuat : Abu Labib 23/06/09
(defun c:ROD () ; rolling offset dimension
(setq dimrun (entget(car(entsel "nPilih Dimensi Run:"))))
(setq dimrun1 (cdr (assoc 1 dimrun)))
(setq dimrun42 (cdr (assoc 42 dimrun)))
(if (= dimrun1 "")
(setq dimrun dimrun42)
(setq dimrun (atof dimrun1))
);if
(setq dimroll (entget(car(entsel "nPilih Dimensi Roll:"))))
(setq dimroll1 (cdr(assoc 1 dimroll)))
(setq dimroll42 (cdr(assoc 42 dimroll)))
(if (= dimroll1 "")
(setq dimroll dimroll42)
(setq dimroll (atof dimroll1))
);if
(setq dimc (sqrt (+ (expt dimrun 2) (expt dimroll 2))))

(setq dimrise (entget(car(entsel "nPilih Dimensi Rise:"))))
(setq dimrise1 (cdr (assoc 1 dimrise)))
(setq dimrise42 (cdr (assoc 42 dimrise)))
(if (= dimrise1 "")
(setq dimrise dimrise42)
(setq dimrise (atof dimrise1))
)

(setq travel (sqrt (+ (expt dimrise 2) (expt dimc 2))))

(setq pt1 (getpoint "nTentukan titik pertama"))
(setq pt2 (getpoint pt1 "nTentukan titik kedua"))
(setq oldosn (getvar "osmode"))
(setvar "osmode" 0)
(command "_dimaligned" pt1 pt2 pause "")
(setq ed (entlast))
(command "_dimedit" "O" ed "" "-90" )
(setq edx (entlast))
(setq edim(entget edx))
(setq ed1 (assoc 1 edim))
(setq ed2 (cons 1 (rtos travel 2 1 )))
(setq edim (subst ed2 ed1 edim))
(entmod edim)
(entupd edx)
(setvar "osmode" oldosn)

(princ)
);defun
(princ)

Ingin tau lebih dalam tentang AutoLISP silahkan hub :

udaafAtTentangCadDotCom

Popularity: 3%


Selanjutnya:

Tulisan Terkait

« Snap Angle Vs Rotate UCS (2D)
Koordinat Gambar dengan Field »

Ayo Diskusikan di Sini!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>