pick point or enter from keyboard

I feel silly. I want my lisp routine to give me the choice between picking a point with the mouse or entering from the keyboard.

if I digitize, I just want one component - in this case the Y, or the elevation in my small little mind.

so if I enter it might be "72" that I would type, top of windows usuallly being 6'-10" above finished floor. (one application)

this should be real easy, brain flatulance.

I'm tired of copying my roof pitches, I want to pick a wall on my elevations for the X, give it the Y, overhang and pitch, and let the routine draw the rest.

thanks.

Reply to
roy
Loading thread data ...

Wanna post the code?

Reply to
Michael Bulatovich

sounds like fun, need a little time to pick the one I want to work on first. thanks.

Reply to
roy

HiHo; Without seeing your code you might review these, GETPOINT COND SSGET Hope this helps.......

Reply to
bestafor

Take a number ; ) ...

...

The getpoint call will allow a keyboard entry of point coordinates, but what you want is to maybe get the X value of a point one way and the Y another. Why not create a set of prompts, gather the data, then put it together to make the point? Prompt might look like this:

Set Point for Window: X of.../Y of.../

Reply to
Michael Bulatovich

Take a number ; ) ...

...

The getpoint call will allow a keyboard entry of point coordinates, but what you want is to maybe get the X value of a point one way and the Y another. Why not create a set of prompts, gather the data, then put it together to make the point? Prompt might look like this:

Set Point for Window: X of.../Y of.../

Reply to
Michael Bulatovich

presently I gather my data like this:

;;; INPUT DATA (initget 1 "C D A T") (setq typ (strcase (getkword "\n Casement Doublehung Awning? ")) ) (cond ((= typ "C") (initget 1 "R L N") (setq hinge (strcase (getkword "\n Hinge? Right/Left/None: "))) ) ) (initget 1 "Y N") (setq mul (strcase (getkword "\n Mulls? Y/N: ")) ) (cond ((= mul "Y") (setq vert (getint "\n Number of Vertical Mulls? ") horiz (getint "\n Number of Horizontal Mulls? ") ) ) ) (setq oc 1 pt (getpoint "\nSet Point for Window ") w (getint "\nWindow Width in inches : ") ht (getint "\nWindow Height in inches : ") tr_wid (getreal "\n Enter Trim Width: ") ;;; st_ht (getint "\nWindow Set Height in inches :" txt (strcase (getstring "\n Window Desginator ")) ) (initget 1 "U L B N") (setq soldier (strcase (getkword "\n Brick soldier? Upper/Lower/Both/None: ")) )

;;; END DATA INPUT

[the setq oc is an acronym for open/closed when a subroutine draws a polyline open or closed]

then it is the setq pt I want a choice for. right now I digitize a point, and it requires construction lines. I had it doing

(setq pt (cdr (getpoint "\nSet Point for Window ")))

and would later

(setq pt (cons pt st_ht))

which would let me digitize the x coordinate from where I would have begun an extention line and enter the y coordinate from the keyboard.

it was not as handy as I had envisioned and I want to try something else.

so, I am wanting to try a code snippet that would more or less generically let me choose between digitizing or entering data from the keyboard. I think I can remember seeing it done, but it escapes me still. I have several routines I think I might improve if I can get a better handle on this.

hope this was not too long to read.

thanks.

Reply to
roy

I think I follow. your approach makes better sense. why am I not surprised?

hope I get the time to play with it soon.

thanks.

Reply to
roy

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.