Cold bend table..

Cold bend table..

ekjerside
Contributor Contributor
1,380 Views
20 Replies
Message 1 of 21

Cold bend table..

ekjerside
Contributor
Contributor

Hi 

 

Help...please.

 

I need help to build the if statement. In line 26 I am trying to build a If statement that choose the Heat treatment according tabel CBT PHBT.png , see attachment.  My first goal is put that heat treatment inside the text line thats start at line 30 and put at the end of line 39.. 

 

Please help...thank you very much in advance...

 

 

 

 

 

 

 

 

;;cbt - Insert cold bend table of tubes of 4 items of tubes. 
;;      It calculates the the relationship between RB / D0 to find criteria for Heat treament ect. 
;;Variables
(defun c:cbt ( / 
		A_ITEM A_DIM A_DIMCAL A_THX A_THXCAL A_BENDRADIUS A_INCONEL_LAYER UMAX1 ETI1 A_THX_1 ETO1 TFR1 FIP1 RB_A_DIM A_BENDRATIO PHBT1 CONF1
		B_ITEM B_DIM B_THX B_BENDRADIUS B_INCONEL_LAYER UMAX2 ETI2 B_THX_2 ETO2 TFR2 RB_A_DIM PHBT2
		C_ITEM C_DIM C_THX C_BENDRADIUS C_INCONEL_LAYER UMAX3 ETI3 C_THX_3 ETO3 TFR3 RB_C_DIM PHBT3
		D_ITEM D_DIM D_THX D_BENDRADIUS D_INCONEL_LAYER UMAX4 ETI4 D_THX_4 ETO4 TFR4 RB_D_DIM PHBT4)
;;questions for user input 1 - line 1
(setq A_ITEM (getreal "\nItem no, for line 1? : "))
(setq A_DIM (getreal "\nOutside, Diameter of tube, for line 1? [mm]: "))
(setq A_THX (getreal "\nThickness of tube, for line 1? [mm]: "))
(setq A_BENDRADIUS (getreal "\nBend radius to center of tube, for line 1? [mm]: "))
(setq A_INCONEL_LAYER (getreal "\nSurface treatment, Inconel, Overlay , for line 1? [mm]: "))
;;Calculations of line
;;calculation of do
(setq A_DIMCAL (+ A_DIM (* A_INCONEL_LAYER 2))) 
;;calculation of et
(setq A_THXCAL (+ A_THX A_INCONEL_LAYER))
;;calculation of relationship between rb / d0
(setq RB_A_DIM (/ A_BENDRADIUS (+ A_DIM (* A_INCONEL_LAYER 2))))
(setq A_BENDRATIO (rtos RB_A_DIM 2 2))
;;calculation of TFR
(Setq TFR1 (/(* A_DIMCAL A_DIMCAL) (* A_THXCAL A_BENDRADIUS)))
;;selection of PHBT according to tabel
(if
  (< A_DIMCAL 142) and (> RB_A_DIM 2.5)
  (progn "No post-bend heat treatment required")
  )
;;-----------------------
;;CONFIGURATION OF LINE 1
;;-----------------------
(setq CONF1 (strcat "ITEM NO, LINE 1 = " (RTOS A_ITEM 2 2) " - "
						  "calculated D0 line 1 = " (rtos A_DIMCAL 2 2) " - "
						  "calculated et THICKNESS LINE 1 = " (RTOS A_THXCAL 2 2)  " - "
						  "BENDRADIUS = " (rtos A_BENDRADIUS 2 2) " - "
						  "RB line 1 / Diameter line 1 = " (rtos RB_A_DIM 2 2) " - "  
						  "TFR line 1 = " (rtos TFR1 2 2)
						  "PHBT = " )) 
(setq FIP1 (getpoint "\nChoose Text Insert Point:"))
(Command "-style" "WEIGHT" "ISOCP.shx" "3.5" "1" "0" "n" "n")
(Command "text" "s" "WEIGHT" "j" "MC" FIP1 "0" CONF1)
)

 

 

 

  

0 Likes
Accepted solutions (3)
1,381 Views
20 Replies
Replies (20)
Message 21 of 21

komondormrex
Mentor
Mentor

you mean sort of dcl table to which a user can add data to be seen on a display and then to put all of them at once to block attributes? or else?

0 Likes