I have found the solution:
(setvar "LOFTNORMALS" 4)
So now to my next problem.
How can I insert a local variable into this statement ?:
(setq spt3 (strcat "0" "," "0" "," "200"))
I want to change the value 200 to the variable ERLENGTH.
I have tried:
(setq spt3 (strcat "0" "," "0" "," erlength))
This code works with the value 200 in place.
Code: Select all
(defun DRAW_ER ( / spt1 spt2 ENT1 ENT2 ENT3 ENT4 ENT5 ENT6 EROD1 ERID1 EROD2 ERID2 ERLENGTH )
(setq EROD1 N6)
(setq ERID1 N9).
(setq EROD2 N3)
(setq ERID2 N10)
(setq ERLENGTH N1)
;
(if (and (setq spt1 (getpoint "\nSpecify Start point of Reducer"))
(setq spt2 (getpoint "\nSpecify Direction of Reducer"))
(setq spt3 (strcat "0" "," "0" "," "200")) ;200 WAS ERLENGTH
) ;end of AND
;
;
(progn
(command "ucs" "ZA" spt1 spt2)
(command "circle" "0,0,0" "d" erod1) ;take OD from dim file
(setq ENT1 (entlast))
(command "circle" "0,0,0" "d" erid1) ;take ID from dim file
(setq ENT2 (entlast))
;
;
(command "circle" spt3 "d" erod2) ;take OD from dim file
(setq ENT3 (entlast))
(command "circle" spt3 "d" erid2) ;take ID from dim file
(setq ENT4 (entlast))
;
; ; setvar LOFTNORMALS 1 set this to 4
(setvar "LOFTNORMALS" 4) ; this works on command line
(command "loft" ENT1 "" ENT3 "" "")
(setq ENT5 (entlast))
(command "_loft" ENT2 "" ENT4 "" "")
(setq ENT6 (entlast))
;
;
(command "subtract" ENT5 "" ENT6 "")
(command "ucs" "_P")
(setvar "LOFTNORMALS" 1)
;
) ;_ end of progn
) ;_ end of IF
) ;end DRAW_ER
Steve