Search the Community
Showing results for tags 'nil'.
-
error: bad argument type: 2D/3D point: nil (Makes no sense!)
duanuys posted a topic in AutoLISP, Visual LISP & DCL
Here is the code, and i tried commenting it so it is easy to follow, in a nutshell all this is doing is creating a circle, hatching it with the color red, and making a line from the center upwards and making it red.. Now it runs all of this perfectly smoothly.. but when i copy and paste the exact code block that generates the line going up and just change some variables so that the line goes down.. it gives me the error in my title.. what gives?? ((= choice 2) (setq gas_redo 0) (setq gas_another 0) (while (/= gas_redo 1) (prompt "\nYou have chosen Gas") (setq pg_cpo1 (getpoint "\nPick well location")) (setq pg_cpo2 (polar pg_cpo1 (dtr 90.0) edge)) (command "circle" "2p" pg_cpo1 pg_cpo2) ;draw circle (setq pg_hw (polar pg_cpo1 (dtr 90.0) (/ edge 2))) (command "-hatch" pg_hw "P" "S" "CO" "T" "255,0,0" "" ""); hatch the circle with COLOR_RED (setq pg_NL1 (polar pg_cpo1 (dtr 90.0) edge)) ;set points for north line (setq pg_NL2 (polar pg_NL1 (dtr 90.0) (/ edge 2))) ; " " (command "line" pg_NL1 pg_NL2 "") ; drew line north of circle (command "change" pg_NL2 "" "P" "CO" "T" "255,0,0" ""); changed the line color to red (setq pg_SL1 (polar pg_cpo1 (dtr 270.0) edge)) ;IT DOESN"T LIKE THIS CODE BLOCK (setq pg_SL2 (polar pg_SL2 (dtr 270.0) (/ edge 2))) (command "line" pg_SL1 pg_SL2 "") (command "change" pg_SL2 "" "P" "CO" "T" "255,0,0" "") (setq gas_another(getint "\nCreate another? (1)YES or (2)NO")) (if (= gas_another 2) (setq gas_redo 1) (prompt"\nDrawing another Gas Well..")) ) ) -
Can someone help me on why this code is throwing nil? (command "_area") (while (> (getvar "cmdactive") 0) (command pause)) (setq e (getvar "_area")) e has nil value...
-
Please someone tell me why this: (> (* 126 a) 3000) returns nil, when a=3 (or any other value) ?