Archiman86 Posted November 24, 2009 Posted November 24, 2009 What would be a better way of doing this. This does not seem to work. I am trying to pause in order to have the user input the scale for the hatching, because it will be different dpending on the scale of the drawing. Obviously "cloud" is a variable assigned to a previously created object. Any help is appreciated. Thanks in advance. (command "-bhatch" "a" "a" "y" "" "p" "ansi31" (princ "\nWhat scale: ") pause "0" "s" cloud "" "") :Edit - It works fine without the princ command (just the pause), but then other users wont know what to input. I am trying to find a way to easily prompt the user for the scale.
alanjt Posted November 24, 2009 Posted November 24, 2009 Here's two options: (princ "\nWhat scale: ") (command "-bhatch" "a" "a" "y" "" "p" "ansi31" pause "0" "s" cloud "" "") OR (if (setq scale (getreal "\nWhat scale: ")) (command "-bhatch" "a" "a" "y" "" "p" "ansi31" scale "0" "s" cloud "" ""))
Freerefill Posted November 24, 2009 Posted November 24, 2009 Your problem, I think, is that the (princ) function is returning a value, whatever the value happens to be. That value is fed to the command line as input, which isn't recognized as valid.
rkmcswain Posted November 24, 2009 Posted November 24, 2009 Even one more way... (vl-cmdf "._bhatch" "_A" "_A" "_Y" "" "_P" "_ANSI31" (getreal "\nEnter Scale: ") 0.0 "_S" cloud "" "")
Archiman86 Posted November 24, 2009 Author Posted November 24, 2009 Thanks, that works great! That is exactly what I was looking for.
Recommended Posts