vferrara
2006-12-04, 11:14 PM
Hello AUGI Members:
I am trying to develop a routine that will determine the proper format of a text callout for a footing on a drawing. For example: when the Xsize of the footing is 5'-0" and the Ysize of the footing is 5'-0" the callout should be F5. When the Xsize of the footing is 5'-0" and the Ysize of the footing is 8'-0" then the callout should be F58. There is also a condition as follows: When the Xsize of the footing is 5'-0" and the Ysize of the footing is 8'-6" then the callout would be F58.5 and if the Xsize of the footing is 5'-6" and the Ysize of the footing is 8'-6" then the callout would be F5.58.5......and so on....!
Here is the piece of code where I try to setup the callouts but there is a problem with the code.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;
;;;;;;
(Defun Fdntag ()
(setq SX (/ Xxsf 12))
(setq SY (/ Yysf 12))
;;;;;;
;;;;;;COMPOSE CALL OUT
;;;;;;
(setq SizX (rtos SX 2 2))
(setq SizY (rtos SY 2 2))
(If (= SizX SizY)(Fdntag1))
(If (/= SizX SizY)(Fdntag2))
)
;;;;;;
;;;;;;LENGTH = WIDTH
;;;;;;
(defun Fdntag1 ()
(setq SizX2 (rtos SX 2 0))
(setq SizY2 (rtos SY 2 0))
(setq Tnam (strcat "F" SizX2))
)
;;;;;;
;;;;;;LENGTH / = WIDTH
;;;;;;
(defun Fdntag2 ()
(setq SizX (rtos SX 2 2))
(setq SizY (rtos SY 2 2))
(setq SizX2 (rtos SX 2 0))
(setq SizY2 (rtos SY 2 0))
(setq Xend (substr SizX 4 2))
(setq Yend (substr SizY 4 2))
(If (And (= Xend "00")(/= Yend "00")) (Setq Tnam (strcat "F" SizX2 SizY)))
(If (And (/= Xend "00")(= Yend "00")) (Setq Tnam (strcat "F" SizX SizY2)))
(If (And (/= Xend "00")(/= Yend "00")) (Setq Tnam (strcat "F" SizX SizY)))
(If (And (= Xend "00")(= Yend "00")) (Setq Tnam (strcat "F" SizX2 SizY2)))
)
Any assistance in resolving this problem would be appreciated....!!!
Regards,
Vince
I am trying to develop a routine that will determine the proper format of a text callout for a footing on a drawing. For example: when the Xsize of the footing is 5'-0" and the Ysize of the footing is 5'-0" the callout should be F5. When the Xsize of the footing is 5'-0" and the Ysize of the footing is 8'-0" then the callout should be F58. There is also a condition as follows: When the Xsize of the footing is 5'-0" and the Ysize of the footing is 8'-6" then the callout would be F58.5 and if the Xsize of the footing is 5'-6" and the Ysize of the footing is 8'-6" then the callout would be F5.58.5......and so on....!
Here is the piece of code where I try to setup the callouts but there is a problem with the code.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;
;;;;;;
(Defun Fdntag ()
(setq SX (/ Xxsf 12))
(setq SY (/ Yysf 12))
;;;;;;
;;;;;;COMPOSE CALL OUT
;;;;;;
(setq SizX (rtos SX 2 2))
(setq SizY (rtos SY 2 2))
(If (= SizX SizY)(Fdntag1))
(If (/= SizX SizY)(Fdntag2))
)
;;;;;;
;;;;;;LENGTH = WIDTH
;;;;;;
(defun Fdntag1 ()
(setq SizX2 (rtos SX 2 0))
(setq SizY2 (rtos SY 2 0))
(setq Tnam (strcat "F" SizX2))
)
;;;;;;
;;;;;;LENGTH / = WIDTH
;;;;;;
(defun Fdntag2 ()
(setq SizX (rtos SX 2 2))
(setq SizY (rtos SY 2 2))
(setq SizX2 (rtos SX 2 0))
(setq SizY2 (rtos SY 2 0))
(setq Xend (substr SizX 4 2))
(setq Yend (substr SizY 4 2))
(If (And (= Xend "00")(/= Yend "00")) (Setq Tnam (strcat "F" SizX2 SizY)))
(If (And (/= Xend "00")(= Yend "00")) (Setq Tnam (strcat "F" SizX SizY2)))
(If (And (/= Xend "00")(/= Yend "00")) (Setq Tnam (strcat "F" SizX SizY)))
(If (And (= Xend "00")(= Yend "00")) (Setq Tnam (strcat "F" SizX2 SizY2)))
)
Any assistance in resolving this problem would be appreciated....!!!
Regards,
Vince