; 1/2" PIPE
(defun c:p15_80 ()
(pipe "1/2\"" 21.3 "80" "API 5L Gr B Seamless PE" "ASME B31.3" 1.618)
)
(defun c:p15_160 ()
(pipe "1/2\"" 21.3 "160" "API 5L Gr B Seamless PE" "ASME B31.3" 1.949)
)
(defun c:p15_XXS ()
(pipe "1/2\"" 21.3 "XXS" "API 5L Gr B Seamless PE" "ASME B31.3" 2.548)
)
(defun c:p15_XXS_X65 ()
(pipe "1/2\"" 21.3 "XXS" "API 5L Gr X65 Seamless PE" "ASME B31.3" 2.548)
)
(defun c:p15_80S_TP316L ()
(pipe "1/2\"" 21.3 "80S" "A312 TP316L Seamless or Welded (SAW) per ASTM A358 Gr316L Class 1 (100% radigraphy) PE" "ASME B31.3" 1.618 )
)
(defun c:p15_80S_TP321 ()
(pipe "1/2\"" 21.3 "80S" "ASTM A312 TP321 Seamless PE" "ASME B31.3" 1.618 )
)
(defun c:p15_80S_DUPLEX ()
(pipe "1/2\"" 21.3 "80S" "ASTM A790 UNS S31803 seamless or ASTM A928 Class 1 Welded - 100% radiography PE" "ASME B31.3" 1.618 )
)
; 3/4" PIPE
(defun c:p20_80 ()
(pipe "3/4\"" 26.7 "80" "API 5L Gr B Seamless PE" "ASME B31.3" 2.192)
)
(defun c:p20_160 ()
(pipe "3/4\"" 26.7 "160" "API 5L Gr B Seamless PE" "ASME B31.3" 2.887)
)
(defun c:p20_XXS ()
(pipe "3/4\"" 26.7 "XXS" "API 5L Gr B Seamless PE" "ASME B31.3" 3.641)
)
(defun c:p20_XXS_X65 ()
(pipe "3/4\"" 26.7 "XXS" "API 5L Gr X65 Seamless PE" "ASME B31.3" 3.641)
)
(defun c:p20_80S_TP316L ()
(pipe "3/4\"" 26.67 "80S" "A312 TP316L Seamless or Welded (SAW) per ASTM A358 Gr316L Class 1 (100% radigraphy) PE" "ASME B31.3" 2.192)
)
(defun c:p20_80S_DUPLEX ()
(pipe "3/4\"" 26.67 "80S" "ASTM A790 UNS S31803 seamless or SAW - 100% radiography PE" "ASME B31.3" 2.192)
)
(defun c:p20_80S_TP321 ()
(pipe "3/4\"" 26.67 "80S" "A312 TP321 Seamless PE" "ASME B31.3" 2.887 )
)
(defun c:p20_160CS ()
(pipe "3/4\"" 26.7 "160" "API 5L Gr B Seamless PE" "ASME B31.3" 2.88)
)
; 1" PIPE
(defun c:p25_80 ()
(pipe "1\"" 33.4 "80" "API 5L Gr B Seamless PE" "ASME B31.3" 3.231 )
)
(defun c:p25_160 ()
(pipe "1\"" 33.4 "160" "API 5L Gr B Seamless PE" "ASME B31.3" 4.241 )
)
(defun c:p25_XXS ()
(pipe "1\"" 33.4 "XXS" "API 5L Gr B Seamless PE" "ASME B31.3" 5.449 )
)
(defun c:p25_80_LTCS ()
(pipe "1\"" 33.4 "80" "ASTM A333 Gr 6 Seamless PE" "ASME B31.3" 3.231 )
)
(defun c:p25_80S_TP316L ()
(pipe "1\"" 33.4 "80S" "A312 TP316L Seamless or Welded (SAW) per ASTM A358 Gr316L Class 1 (100% radigraphy) PE" "ASME B31.3" 3.231 )
)
(defun c:p25_80S_TP321 ()
(pipe "1\"" 33.4 "80S" "A312 TP321 Seamless PE" "ASME B31.3" 3.231 )
)
(defun c:p25_80S_F316L ()
(pipe "1\"" 33.4 "80S" "ASTM B677 UNS N08904 Seamless PE" "ASME B36.10" 3.231 )
)
(defun c:p25_80S_DUPLEX ()
(pipe "1\"" 33.4 "80S" "ASTM A790 UNS S31803 seamless or ASTM A928 Class 1 Welded - 100% radiography PE" "ASME B31.3" 3.231 )
)
(defun c:p25_600 ()
(pipe "1\"" 33.4 "160" "API 5L Gr B Seamless PE" "ASME B31.3" 4.23 )
)
; 1 1/2" PIPE
(defun c:p40_80 ()
(pipe "1 1/2\"" 48.3 "80" "API 5L Gr B Seamless PE" "ASME B31.3" 5.404 )
)
(defun c:p40_160 ()
(pipe "1 1/2\"" 48.3 "160" "API 5L Gr B Seamless PE" "ASME B31.3" 7.235 )
)
(defun c:p40_XXS ()
(pipe "1 1/2\"" 48.3 "XXS" "API 5L Gr B Seamless PE" "ASME B31.3" 9.549 )
)
(defun c:p40_XXS_X60 ()
(pipe "1 1/2\"" 48.3 "XXS" "API 5L Gr X60 Seamless PE" "ASME B31.3" 9.549 )
)
(defun c:p40_XXS_X65 ()
(pipe "1 1/2\"" 48.3 "XXS" "API 5L Gr X65 Seamless PE" "ASME B31.3" 9.549 )
)
(defun c:p40_80S_TP316L ()
(pipe "1 1/2\"" 48.3 "80S" "A312 TP316L Seamless or Welded (SAW) per ASTM A358 Gr316L Class 1 (100% radigraphy) PE" "ASME B31.3" 5.404 )
)
(defun c:p40_80S_TP321 ()
(pipe "1 1/2\"" 48.3 "80S" "ASTM A312 TP321 Seamless PE" "ASME B31.3" 5.404 )
)
(defun c:p40_80S_DUPLEX ()
(pipe "1 1/2\"" 48.3 "80S" "ASTM A790 UNS S31803 seamless or ASTM A928 Class 1 Welded - 100% radiography PE" "ASME B31.3" 5.404 )
)
(defun c:p40_80S ()
(pipe "1 1/2\"" 48.3 "80S" "ASTM A790 UNS S31803 seamless PE" "ASME B31.3" 5.404 )
)
(defun c:p40_160 ()
(pipe "1 1/2\"" 48.3 "80" "API 5L Gr B Seamless and SAW - 100% radiography PE" "ASME B31.3" 5.404 )
)
; 2" PIPE
(defun c:p50_40 ()
(pipe "2\"" 60.3 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 5.437 )
)
(defun c:p50_80 ()
(pipe "2\"" 60.3 "80" "API 5L Gr B Seamless BE" "ASME B31.3" 7.481 )
)
(defun c:p50_160 ()
(pipe "2\"" 60.3 "160" "API 5L Gr B Seamless BE" "ASME B31.3" 11.113 )
)
(defun c:p50_XXS ()
(pipe "2\"" 60.3 "XXS" "API 5L Gr B Seamless BE" "ASME B31.3" 13.448 )
)
(defun c:p50_80_A106GrB ()
(pipe "2\"" 60.3 "80" "ASTM A106 Gr B Seamless BE" "ASME B31.3" 7.479 )
)
(defun c:p50_80_LTCS ()
(pipe "2\"" 60.3 "80" "ASTM A333 Gr 6 Seamless BE" "ASME B31.3" 7.481 )
)
(defun c:p50_40S_TP316L ()
(pipe "2\"" 60.3 "40S" "ASTM A312 TP316L Seamless or Welded (SAW) per ASTM A358 Gr316L Class 1 (100% radigraphy) PE" "ASME B31.3" 5.437 )
)
(defun c:p50_40S_TP321 ()
(pipe "2\"" 60.3 "40S" "ASTM A312 TP321 Seamless BE" "ASME B31.3" 5.437 )
)
(defun c:p50_80S_TP321 ()
(pipe "2\"" 60.3 "80S" "ASTM A312 TP321 Seamless BE" "ASME B31.3" 7.480 )
)
(defun c:p50_80S_F316L ()
(pipe "2\"" 60.3 "80S" "ASTM B677 UNS N08904 Seamless PE" "ASME B36.10" 7.481 )
)
(defun c:p50_80S_DUPLEX ()
(pipe "2\"" 60.3 "80S" "ASTM A790 UNS S31803 seamless or ASTM A928 Class 1 Welded - 100% radiography BE" "ASME B31.3" 7.481 )
)
(defun c:p50_XXS_X60 ()
(pipe "2\"" 60.3 "XXS" "API 5L X60 Seamless BE" "ASME B31.3" 13.433 )
)
(defun c:p50_X60 ()
(pipe "2\"" 60.3 "XXS" "API 5L X60 Seamless BE" "ASME B31.3" 13.433 )
)
; 3" PIPE
(defun c:p80_40 ()
(pipe "3\"" 88.9 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 11.265 )
)
(defun c:p80_80 ()
(pipe "3\"" 88.9 "80" "API 5L Gr B Seamless BE" "ASME B31.3" 15.273 )
)
(defun c:p80_160 ()
(pipe "3\"" 88.9 "160" "API 5L Gr B Seamless BE" "ASME B31.3" 21.311 )
)
(defun c:p80_40_A106GrB ()
(pipe "3\"" 88.9 "40" "ASTM A106 Gr B Seamless BE" "ASME B31.3" 11.283 )
)
(defun c:p80_40_LTCS ()
(pipe "3\"" 88.9 "40" "ASTM A333 Gr 6 Seamless BE" "ASME B31.3" 11.265 )
)
(defun c:p80_10S_TP316L ()
(pipe "3\"" 88.9 "10S" "ASTM A312 TP316L Seamless or Welded (SAW) per ASTM A358 Gr316L Class 1 (100% radigraphy) PE" "ASME B31.3" 6.444 )
)
(defun c:p80_10S_TP321 ()
(pipe "3\"" 88.9 "10S" "ASTM A312 TP321 Seamless BE" "ASME B31.3" 6.444 )
)
(defun c:p80_80S_TP321 ()
(pipe "3\"" 88.9 "80S" "ASTM A312 TP321 Seamless BE" "ASME B31.3" 15.27 )
)
(defun c:p80_80S_DUPLEX ()
(pipe "3\"" 88.9 "80S" "ASTM A790 UNS S31803 seamless or ASTM A928 Class 1 Welded - 100% radiography BE" "ASME B31.3" 15.27 )
)
(defun c:p80_9wt_DUPLEX ()
(pipe "3\"" 88.9 "9wt" "ASTM A790 UNS S31803 seamless BE" "ASME B31.3" 17.73 )
)
(defun c:p80_X60 ()
(pipe "3\"" 88.9 "15.3" "API 5L X60 Seamless BE" "ASME B31.3" 11.283 )
)
(defun c:p80_80CS ()
(pipe "3\"" 88.9 "80" "API 5L Gr B Seamless BE" "ASME B31.3" 15.26 )
)
(defun c:p80_160CS ()
(pipe "3\"" 88.9 "160" "ASTM A333 Gr 6 Seamless BE" "ASME B31.3" 21.32 )
)
; 4" PIPE
(defun c:p100_40 ()
(pipe "4\"" 114.3 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 16.075 )
)
(defun c:p100_80 ()
(pipe "4\"" 114.3 "80" "API 5L Gr B Seamless BE" "ASME B31.3" 22.321 )
)
(defun c:p100_160 ()
(pipe "4\"" 114.3 "160" "API 5L Gr B Seamless BE" "ASME B31.3" 41.027 )
)
(defun c:p100_40_A106GrB ()
(pipe "4\"" 114.3 "40" "ASTM A106 Gr B Seamless BE" "ASME B31.3" 16.071 )
)
(defun c:p100_40_LTCS ()
(pipe "4\"" 114.3 "40" "ASTM A333 Gr 6 Seamless BE" "ASME B31.3" 16.075 )
)
(defun c:p100_10S_TP321 ()
(pipe "4\"" 114.3 "10S" "ASTM A312 TP321 Seamless BE" "ASME B31.3" 8.360 )
)
(defun c:p100_80S_TP321 ()
(pipe "4\"" 114.3 "80S" "ASTM A312 TP321 Seamless BE" "ASME B31.3" 22.32 )
)
(defun c:p100_80S_DUPLEX ()
(pipe "4\"" 114.3 "80S" "ASTM A790 UNS S31803 seamless or ASTM A928 Class 1 Welded - 100% radiography BE" "ASME B31.3" 22.32 )
)
(defun c:p100_12_6wt_DUPLEX ()
(pipe "4\"" 114.3 "12.6wt" "ASTM A790 UNS S31803 seamless or SAW - 100% radiography BE" "ASME B31.3" 31.59 )
)
(defun c:p100_13_7wt_DUPLEX ()
(pipe "4\"" 114.3 "13.7wt" "ASTM A790 UNS S31803 seamless or SAW - 100% radiography BE" "ASME B31.3" 29.69 )
)
(defun c:p100_80CS ()
(pipe "4\"" 114.3 "80" "API 5L Gr B Seamless BE" "ASME B31.3" 22.30 )
)
(defun c:p100_40 ()
(pipe "4\"" 114.3 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 16.075 )
)
(defun c:p100_160_CS ()
(pipe "4\"" 114.3 "160" "ASTM A333 Gr 6 Seamless BE" "ASME B31.3" 33.50 )
)
(defun c:p100_40_Crbn_Steel ()
(pipe "4\"" 114.3 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 16.060 )
)
; 6" PIPE
(defun c:p150_40 ()
(pipe "6\"" 168.28 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 28.23 )
)
(defun c:p150_80 ()
(pipe "6\"" 168.28 "80" "API 5L Gr B Seamless BE" "ASME B31.3" 42.517 )
)
(defun c:p150_120 ()
(pipe "6\"" 168.28 "120" "API 5L Gr B Seamless BE" "ASME B31.3" 54.202 )
)
(defun c:p150_160 ()
(pipe "6\"" 168.28 "160" "API 5L Gr B Seamless BE" "ASME B31.3" 67.414 )
)
(defun c:p150_40_A106GrB ()
(pipe "6\"" 168.28 "40" "ASTM A106 Gr B Seamless BE" "ASME B31.3" 28.26 )
)
(defun c:p150_10S_TP321 ()
(pipe "6\"" 168.28 "10S" "ASTM A312 TP321 Seamless or Welded (SAW) per ASTM A358 Gr321 Class 1 (100% radigraphy) BE" "ASME B31.3" 13.836 )
)
(defun c:p150_80S_TP321 ()
(pipe "6\"" 168.28 "80S" "ASTM A312 TP321 Seamless BE" "ASME B31.3" 42.55 )
)
(defun c:p150_80S_DUPLEX ()
(pipe "6\"" 168.28 "80S" "ASTM A790 UNS S31803 seamless or ASTM A928 Class 1 Welded - 100% radiography BE" "ASME B31.3" 42.55 )
)
(defun c:p150_15_88wt_DUPLEX ()
(pipe "6\"" 168.28 "15.88wt" "ASTM A790 UNS S31803 seamless or SAW - 100% radiography BE" "ASME B31.3" 59.67 )
)
(defun c:p150_18_5wt_DUPLEX ()
(pipe "6\"" 168.28 "18.5wt" "ASTM A790 UNS S31803 seamless or SAW - 100% radiography BE" "ASME B31.3" 68.32 )
)
(defun c:p150_20_2wt_DUPLEX ()
(pipe "6\"" 168.28 "20.2wt" "ASTM A790 UNS S31803 seamless or SAW - 100% radiography BE" "ASME B31.3" 65.85 )
)
(defun c:p150_3wt_CUNI ()
(pipe "6\"" 168.28 "3wt" "BS EN 12449 Gr CW352H SMLS" "ASME B31.3" 15.75 )
)
(defun c:p150_600 ()
(pipe "6\"" 168.28 "80" "API 5L Gr B Seamless BE" "ASME B31.3" 28.23 )
)
; 8" PIPE
(defun c:p200_20 ()
(pipe "8\"" 219.08 "20" "API 5L Gr B Seamless BE" "ASME B31.3" 33.335 )
)
(defun c:p200_30 ()
(pipe "8\"" 219.08 "30" "API 5L Gr B Seamless BE" "ASME B31.3" 36.758 )
)
(defun c:p200_40 ()
(pipe "8\"" 219.08 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 42.487 )
)
(defun c:p200_80 ()
(pipe "8\"" 219.08 "80" "API 5L Gr B Seamless BE" "ASME B31.3" 64.571 )
)
(defun c:p200_120 ()
(pipe "8\"" 219.08 "120" "API 5L Gr B Seamless BE" "ASME B31.3" 90.422 )
)
(defun c:p200_140 ()
(pipe "8\"" 219.08 "140" "API 5L Gr B Seamless BE" "ASME B31.3" 100.898 )
)
(defun c:p200_140_X65 ()
(pipe "8\"" 219.08 "140" "API 5L Gr X65 Seamless BE" "ASME B31.3" 100.898 )
)
(defun c:p200_160 ()
(pipe "8\"" 219.08 "160" "API 5L Gr B Seamless BE" "ASME B31.3" 111.166 )
)
(defun c:p200_10S_TP321 ()
(pipe "8\"" 219.08 "10S" "ASTM A312 TP321 Seamless or Welded (SAW) per ASTM A358 Gr321 Class 1 (100% radigraphy) BE" "ASME B31.3" 19.957 )
)
(defun c:p200_80S_TP321 ()
(pipe "8\"" 219.08 "80S" "ASTM A312 TP321 Seamless or Welded (SAW) per ASTM A358 Gr321 Class 1 (100% radigraphy) BE" "ASME B31.3" 64.62 )
)
(defun c:p200_80S_DUPLEX ()
(pipe "8\"" 219.08 "80S" "ASTM A790 UNS S31803 seamless or ASTM A928 Class 1 Welded - 100% radiography BE" "ASME B31.3" 64.63 )
)
(defun c:p200_26_3wt_DUPLEX ()
(pipe "8\"" 219.08 "26.3wt" "ASTM A790 UNS S31803 seamless or SAW - 100% radiography BE" "ASME B31.3" 114.72 )
)
(defun c:p200_24_1wt_DUPLEX ()
(pipe "8\"" 219.08 "24.1wt" "ASTM A790 UNS S31803 seamless or SAW - 100% radiography BE" "ASME B31.3" 115.9 )
)
(defun c:p200_4wt_CUNI ()
(pipe "8\"" 219.08 "4wt" "BS EN 12449 Gr CW352H SMLS" "ASME B31.3" 20.59 )
)
; 10" PIPE
(defun c:p250_20 ()
(pipe "10\"" 273.05 "20" "API 5L Gr B Seamless BE" "ASME B31.3" 41.713 )
)
(defun c:p250_30 ()
(pipe "10\"" 273.05 "30" "API 5L Gr B Seamless BE" "ASME B31.3" 50.955 )
)
(defun c:p250_40 ()
(pipe "10\"" 273.05 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 60.241 )
)
(defun c:p250_80 ()
(pipe "10\"" 273.05 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 95.838 )
)
(defun c:p250_120 ()
(pipe "10\"" 273.05 "120" "API 5L Gr B Seamless BE" "ASME B31.3" 132.993 )
)
(defun c:p250_140 ()
(pipe "10\"" 273.05 "140" "API 5L Gr B Seamless BE" "ASME B31.3" 155.093 )
)
(defun c:p250_160 ()
(pipe "10\"" 273.05 "160" "API 5L Gr B Seamless BE" "ASME B31.3" 172.627 )
)
(defun c:p250_18_26_321 ()
(pipe "10\"" 273.05 "18.26wt" "ASTM A358 Gr 321 Welded (SAW) Class 1 (100% radiography) BE" "ASME B31.3" 114.711 )
)
(defun c:p250_80S ()
(pipe "10\"" 273.05 "80S" "ASTM A790 UNS S31803 Seamless or ASTM A928 Class 1 Welded - 100% radiography BE" "ASME B31.3" 81.46 )
)
; 12" PIPE
(defun c:p300_8_74wt ()
(pipe "12\"" 323.85 "8.74wt" "API 5L Gr B Seamless BE" "ASME B31.3" 67.62 )
)
(defun c:p300_20 ()
(pipe "12\"" 323.85 "20" "API 5L Gr B Seamless BE" "ASME B31.3" 49.705 )
)
(defun c:p300_30 ()
(pipe "12\"" 323.85 "30" "API 5L Gr B Seamless BE" "ASME B31.3" 65.182 )
)
(defun c:p300_40 ()
(pipe "12\"" 323.85 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 79.766 )
)
(defun c:p300_80 ()
(pipe "12\"" 323.85 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 131.851 )
)
(defun c:p300_120 ()
(pipe "12\"" 323.85 "120" "API 5L Gr B Seamless BE" "ASME B31.3" 186.907 )
)
(defun c:p300_160 ()
(pipe "12\"" 323.85 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 239.594 )
)
(defun c:p300_10S_TP321 ()
(pipe "12\"" 323.85 "10S" "ASTM A312 TP321 Seamless or Welded (SAW) per ASTM A358 Gr321 Class 1 (100% radigraphy) BE" "ASME B31.3" 35.991 )
)
(defun c:p300_600 ()
(pipe "12\"" 323.85 "80" "API 5L Gr B Seamless BE" "ASME B31.3" 131.95 )
)
(defun c:p300_80CS ()
(pipe "12\"" 323.85 "80CS" "API 5L Gr B Seamless and SAW - 100% radiography BE" "ASME B31.3" 131.95 )
)
(defun c:p300_80SC ()
(pipe "12\"" 323.85 "80" "API 5L Gr B Seamless BE" "ASME B31.3" 230 )
)
; 14" PIPE
(defun c:p350_8_74wt ()
(pipe "14\"" 355.6 "8.74wt" "API 5L Gr B Seamless BE" "ASME B31.3" 74.42 )
)
(defun c:p350_20 ()
(pipe "14\"" 355.6 "20" "API 5L Gr B Seamless BE" "ASME B31.3" 68.456 )
)
(defun c:p350_30 ()
(pipe "14\"" 355.6 "30" "API 5L Gr B Seamless BE" "ASME B31.3" 81.849 )
)
(defun c:p350_40 ()
(pipe "14\"" 355.6 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 93.754 )
)
(defun c:p350_80 ()
(pipe "14\"" 355.6 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 159.234 )
)
(defun c:p350_160 ()
(pipe "14\"" 355.6 "40" "API 5L Gr B Seamless BE" "ASME B31.3" 282.751 )
)
(defun c:p350_10S_TP321 ()
(pipe "14\"" 355.6 "10S" "ASTM A358 Gr321 Welded (SAW) Class 1 (100% radigraphy) BE" "ASME B31.3" 41.305 )
)
; 16" PIPE
(defun c:p400_20_6wt_TP321 ()
(pipe "16\"" 406.4 "20.6wt" "ASTM A312 TP321 Welded (SAW) per ASTM A358 Gr321 Class 1 (100% radigraphy) BE" "ASME B31.3" 195.95 )
)
(defun c:p400_20 ()
(pipe "16\"" 406.4 "20" "API 5L Gr B Seamless BE" "ASME B31.3" 77.859 )
)
(defun c:p400_10S_TP321 ()
(pipe "16\"" 406.4 "10S" "ASTM A358 Gr321 Welded (SAW) Class 1 (100% radigraphy) BE" "ASME B31.3" 47.286 )
)
; 18" PIPE
(defun c:p457_900 ()
(pipe "18\"" 457 "18.1wt" "ASTM A790 UNS S31803 Seamless or ASTM A928 Class 1 Welded - 100% radigraphy BE" "ASME31.3" 90.03 )
)
; 20" PIPE
(defun c:p500_100 ()
(pipe "20\"" 508 "100" "API 5L Gr X60 SAW - 100% radiography BE" "ASME B31.3" 381.434 )
)
; 24" PIPE
(defun c:p600_8_74wt ()
(pipe "24\"" 610 "8.74wt" "API 5L Gr B SAW - 100% radiography PE" "ASME B31.3" 129 )
)
(defun c:p600_20 ()
(pipe "24\"" 610 "20" "API 5L Gr B SAW - 100% radiography BE" "ASME B31.3" 117.07 )
)
(defun c:p600_100 ()
(pipe "24\"" 610 "100" "API 5L Gr X60 SAW - 100% radiography BE" "ASME B31.3" 546.86 )
)
; 30" PIPE
(defun c:p750_XS ()
(pipe "30\"" 762 "XS" "API 5L X60 SAW - 100% radiography PE" "ASME B31.3" 234.46 )
)
; PIPE INSTALLATION
( DEFUN PIPE (NPS OD SCH MAT SPEC UNITWEIGHT )
(SETQ BASE (GETPOINT "\nSTART") END (GETPOINT BASE "\nFINISH"))
(COMMAND "CYLINDER" BASE "D" OD "C" END)
(SETQ CYL_ENT (ENTLAST))
(SETQ SS (SSADD CYL_ENT))
(SETQ CT_X (/ (+ (CAR BASE) (CAR END)) 2))
(SETQ CT_Y (/ (+ (CADR BASE) (CADR END)) 2))
(SETQ CT_Z (/ (+ (CADDR BASE) (CADDR END)) 2))
(SETQ CENTROID (LIST CT_X CT_Y CT_Z))
(SETQ D_X (- (CAR BASE) (CAR END)))
(SETQ D_Y (- (CADR BASE) (CADR END)))
(SETQ D_Z (- (CADDR BASE) (CADDR END)))
(SETQ QTY (RTOS(/ (SQRT (+ (* D_X D_X) (* D_Y D_Y) (* D_Z D_Z))) 1000 )))
(COMMAND "INSERT" "*ATTRIBUTE GROUP" CENTROID "" "" 0)
; QUANTITY
(SETQ EN1 (ENTNEXT CYL_ENT))
(setq ed (entget en1)) ; Sets ed to the entity data forentity name en1.
(setq ed (subst (cons 1 QTY) (assoc 1 ed) ed))
; Changes the vALUE group in ed to QTY.
(entmod ed) ; Modifies entity en1
(SSADD EN1 SS)
; UNITS
(SETQ EN2 (ENTNEXT EN1))
(setq ED (entget EN2)) ; Sets ed to the entity data forentity name en1.
(SETQ stM "M")
(setq ED (subst (cons 1 stM) (assoc 1 ED) ED))
; Changes the vALUE group in ed to QTY.
(entmod ED) ; Modifies entity en1
(SSADD EN2 SS)
; NOMINAL_SIZE
(SETQ EN3 (ENTNEXT EN2))
(setq ED (entget EN3)) ; Sets ed to the entity data forentity name en1.
(setq ED (subst (cons 1 NPS) (assoc 1 ED) ED))
; Changes the vALUE group in ed to QTY.
(entmod ED) ; Modifies entity en1
(SSADD EN3 SS)
; NOMINAL_SIZE_2
(SETQ EN4 (ENTNEXT EN3))
(SSADD EN4 SS)
; NOMINAL_SIZE_3
(SETQ EN5 (ENTNEXT EN4))
(SSADD EN5 SS)
; SCHEDULE
(SETQ EN6 (ENTNEXT EN5))
(setq ED (entget EN6)) ; Sets ed to the entity data forentity name en1.
(setq ED (subst (cons 1 SCH) (assoc 1 ED) ED))
; Changes the vALUE group in ed to QTY.
(entmod ED) ; Modifies entity en1
(SSADD EN6 SS)
; RATING
(SETQ EN7 (ENTNEXT EN6))
(SSADD EN7 SS)
; SHORT_NAME
(SETQ EN8 (ENTNEXT EN7))
(setq ED (entget EN8)) ; Sets ed to the entity data forentity name en1.
(SETQ stSHORTNAME "PIPE")
(setq ED (subst (cons 1 stSHORTNAME) (assoc 1 ED) ED))
; Changes the vALUE group in ed to QTY.
(entmod ED) ; Modifies entity en1
(SSADD EN8 SS)
; LONG_NAME
(SETQ EN9 (ENTNEXT EN8))
(setq ED (entget EN9)) ; Sets ed to the entity data forentity name en1.
(SETQ stLONGNAME "PIPE")
(setq ED (subst (cons 1 stLONGNAME) (assoc 1 ED) ED))
; Changes the vALUE group in ed to QTY.
(entmod ED) ; Modifies entity en1
(SSADD EN9 SS)
; MATERIAL
(SETQ EN10 (ENTNEXT EN9))
(setq ED (entget EN10)) ; Sets ed to the entity data forentity name en1.
(setq ED (subst (cons 1 MAT) (assoc 1 ED) ED))
; Changes the vALUE group in ed to QTY.
(entmod ED) ; Modifies entity en1
(SSADD EN10 SS)
; SPECIFICATION
(SETQ EN11 (ENTNEXT EN10))
(setq ED (entget EN11)) ; Sets ed to the entity data forentity name en1.
(setq ED (subst (cons 1 SPEC) (assoc 1 ED) ED))
; Changes the vALUE group in ed to QTY.
(entmod ED) ; Modifies entity en1
(SSADD EN11 SS)
; ADDITIONAL DESCRIPTION
(SETQ EN12 (ENTNEXT EN11))
(SSADD EN12 SS)
; SPN
(SETQ EN13 (ENTNEXT EN12))
(SSADD EN13 SS)
; SZN
(SETQ EN14 (ENTNEXT EN13))
(SSADD EN14 SS)
; UNIT_WEIGHT
(SETQ EN15 (ENTNEXT EN14))
(setq ED (entget EN15)) ; Sets ed to the entity data forentity name en1.
(SETQ RUNITWEIGHT (RTOS UNITWEIGHT))
(setq ED (subst (cons 1 RUNITWEIGHT) (assoc 1 ED) ED))
; Changes the vALUE group in ed to QTY.
(entmod ED) ; Modifies entity en1
(SSADD EN15 SS)
; FILE_NAME
(SETQ EN16 (ENTNEXT EN15))
(SSADD EN16 SS)
; FILE_PATH
(SETQ EN17 (ENTNEXT EN16))
(SSADD EN17 SS)
(SETQ NEW_BLOCK (STRCAT "PIP" (RTOS (GETVAR "CDATE") 2 8)))
(COMMAND "BLOCK" NEW_BLOCK CENTROID SS "")
(COMMAND "INSERT" NEW_BLOCK CENTROID "" "" 0)
(PRINC)
)
;---------------------------------------------------------------------------
; EXTRACT MTO
;---------------------------------------------------------------------------
(DEFUN C:MTOEXTRACT ()
(SETQ MTOTEMPLATEFILE
"H:\\Piping\\DESIGN DRAFTING\\STANDARDS AND TEMPLATES\\MTOEXTRACT.TXT")
(SETQ THISFILEPATH (GETVAR "DWGPREFIX"))
(SETQ THISFILENAME (VL-FILENAME-BASE (GETVAR "DWGNAME")))
(PRINC THISFILENAME)
(SETQ OUTPUTFILENAME (STRCAT THISFILEPATH (STRCAT THISFILENAME ".TXT")))
(COMMAND "ATTEXT" "C" MTOTEMPLATEFILE OUTPUTFILENAME)
(PRINC "MTO EXTRACTION SUDAH SELESAI")
(PRINC)
)
No comments:
Post a Comment