Hello All,
This is an HVAC ducting program and it has a fair amount of nice features. This program is complete with built-in instructions. For information on loading, see this link:
http://www.cadtutor.net/forum/showthread.php?t=1390
Command Syntax is RMD
See images below and please give me your input good or bad.
For a copy of this program in a Metric Version go to this link below or see Post 52:
http://www.cadtutor.net/forum/showth...134#post302134
Attention!
RMD_V5 has now been Revised to RMD_V6.lsp & RMD_V6.dcl
See Attached
Revision List - 02/21/10
Code:
;/////////////////////////////////////////////////////////////////////////////////////////
;;;
;;; Do Not Remove This Header!
;;;
;;; Revisions
;;;
;;; No. | Description | Date
;;;=====|====================================================================|===========
;;; 1.0 | Modify variable localization | 02|07|10
;;; --- | Reduce multiple font styles to one style (arch.shx) | --------
;;; --- | Remove RMD_FSU Font Style Update Function | --------
;;; --- | Remove RMD_TSU Text Size Update Function | --------
;;; --- | Remove RMD_FIS Font Image Function | --------
;;; --- | Modify RMD_CMT Component Mode Tile Function | --------
;;; --- | Modify RMD_IDP Instructions Dialog Page Function | --------
;;;=====|====================================================================|===========
;;; 2.0 | Added TRANS command function so program will work in UCS system | 02|09|10
;;; --- | Adjust User Interface | --------
;;; --- | Removed 3/8"= 1' Viewport Scale | --------
;;;=====|====================================================================|===========
;;; 3.0 | Removed all entity lists from functions RMD_HDUCT thru RMD_FCON | 02|18|10
;;; --- | Added RMD_DFL, RMD_IL and RMD_DE Functions | --------
;;;=====|====================================================================|===========
;;; 4.0 | Added User Defined inside elbow radius and error trapping | 02|19|10
;;;=====|====================================================================|===========
;;; 5.0 | Added a \ to all instances of the degree character in the dcl | 02|20|10
;;; --- | ------------------------------------------------------------------ | --------
;;;=====|====================================================================|===========
;;; 6.0 | Modified RMD_FS Function to use default font style | 02|21|10
;;; --- | ------------------------------------------------------------------ | --------
;/////////////////////////////////////////////////////////////////////////////////////////
If you wish to modify the text style, layer name, layer color, linetype, lineweight and text size. You may do so in this area of the code, Functions 25 and 27.
Code:
;/////////////////////////////////////////////////////////////////////////////////////////
;
; F25 - Make Layer Function.
;
(defun RMD_ML ()
(if (or (= ITYP$ "INTERNAL")(= ITYP$ "EXTERNAL")(= ITYP$ "BOTH"))
(or (tblsearch "ltype" "DUCT_INSL")
(entmake
(list
(cons 0 "LTYPE")
(cons 100 "AcDbSymbolTableRecord")
(cons 100 "AcDbLinetypeTableRecord")
(cons 2 "DUCT_INSL")
(cons 70 0)
(cons 3 "Duct Insulation _ _ _ _ _ _ _ ")
(cons 72 65)
(cons 73 2)
(cons 40 0.046875)
(cons 49 0.03125)
(cons 74 0)
(cons 49 -0.015625)
(cons 74 0)))))
(cond ;Layer Name Layer Color Linetype Lineweight
((and (= DSYS$ "SUPPLY") (= LATYP$ "DUCT")(setq LNAM$ "M-HVAC-SUPP")(setq LCLR# 4)(setq LTYP$ "Continuous")(setq LWGT# 50)))
((and (= DSYS$ "SUPPLY") (= LATYP$ "INSL")(setq LNAM$ "M-HVAC-INSL")(setq LCLR# 1)(setq LTYP$ "DUCT_INSL") (setq LWGT# 18)))
((and (= DSYS$ "SUPPLY") (= LATYP$ "IDEN")(setq LNAM$ "M-HVAC-IDEN")(setq LCLR# 6)(setq LTYP$ "Continuous")(setq LWGT# 35)))
((and (= DSYS$ "RETURN") (= LATYP$ "DUCT")(setq LNAM$ "M-HVAC-RETN")(setq LCLR# 23)(setq LTYP$ "Continuous")(setq LWGT# 50)))
((and (= DSYS$ "RETURN") (= LATYP$ "INSL")(setq LNAM$ "M-HVAC-INSL")(setq LCLR# 1)(setq LTYP$ "DUCT_INSL") (setq LWGT# 18)))
((and (= DSYS$ "RETURN") (= LATYP$ "IDEN")(setq LNAM$ "M-HVAC-IDEN")(setq LCLR# 6)(setq LTYP$ "Continuous")(setq LWGT# 35)))
((and (= DSYS$ "DUST") (= LATYP$ "DUCT")(setq LNAM$ "M-DUST-DUCT")(setq LCLR# 203)(setq LTYP$ "Continuous")(setq LWGT# 50)))
((and (= DSYS$ "DUST") (= LATYP$ "IDEN")(setq LNAM$ "M-DUST-IDEN")(setq LCLR# 6)(setq LTYP$ "Continuous")(setq LWGT# 35)))
((and (= DSYS$ "EXHAUST")(= LATYP$ "DUCT")(setq LNAM$ "M-EXHS-DUCT")(setq LCLR# 83)(setq LTYP$ "Continuous")(setq LWGT# 50)))
((and (= DSYS$ "EXHAUST")(= LATYP$ "IDEN")(setq LNAM$ "M-EXHS-IDEN")(setq LCLR# 6)(setq LTYP$ "Continuous")(setq LWGT# 35))))
(if (null (tblsearch "layer" LNAM$))
(entmake
(list
(cons 0 "LAYER")
(cons 100 "AcDbSymbolTableRecord")
(cons 100 "AcDbLayerTableRecord")
(cons 2 LNAM$)
(cons 6 LTYP$)
(cons 62 LCLR#)
(cons 70 0)
(cons 290 1)
(cons 370 LWGT#))))
(princ))
;
;/////////////////////////////////////////////////////////////////////////////////////////
;
; F27 - Text Size Function.
;
(defun RMD_TS ()
(cond
((= FSCL# 0)(setq TSIZ# (setvar "textsize" 9))) ;9" Height
((= FSCL# 1)(setq TSIZ# (setvar "textsize" 4.5))) ;4-1/2" Height
((= FSCL# 2)(setq TSIZ# (setvar "textsize" 2.25)))) ;2-1/4" Height
(princ))
;
;/////////////////////////////////////////////////////////////////////////////////////////
Thanks,
The Buzzard
Bookmarks