I've been slaying dragons here so I need a little more time.
Maybe someone will jump in there and help out.
If not I'll try to get you going tonight.
But basically you replace the pseudo code with lisp code.
Looking at your routine you have some of the code already.
You don't have to have every option working to test the routine so
Lets start with the Private stair.
Roughly
(Defun C:STEP ()
;;Initialise AutoCAD variables
(Setq BM (Getvar "BLIPMODE"))
(Setvar "BLIPMODE" 0)
(Setq CE (Getvar "CMDECHO"))
(Setvar "CMDECHO" 0)
(Setq OM (Getvar "OSMODE"))
(Setvar "OSMODE" 0)
;;=========================================================
(intget "Private Public Escape Handicap Other")
(setq stair_type (getkword "\nSelect stair type. [Private\Public\Escape\Handicap\Other] <Private> "))
(or stair_type (setq stair_type "Private"))
;;=========================================================
;; set rules based on stair type
;;=========================================================
(cond
((= stair_type "Private")
;; set rules for private
(setq min_rise 155
max_rise 220
Min_going 245
Max_going 260
max_angle 42
min_height (* min_rise 2)
max_height 1800 ; ??
)
)
((= stair_type "Public")
;; set rules for private
(setq max_rise xxx
min_rise xxx
Max_going xxx
Min_going xxx
max_angle xx
)
)
)
;;=========================================================
;; Get the stair information needed to calculate the stair:
;;=========================================================
;; Get total rise
(while
(if
(<= min_height
(progn
(initget 7)
(setq total_rise (getdist "\nEnter the total rise of stairs: "))
)
max_height
)
nil ; exit loop
(prompt (strcat "\n** Error, Value is out of range. ["
(itoa min_hight) " to "
(itoa max_hight) "]"))
)
)
User choice of method, error check using the rules
1) number of risers desired
2) individual riser height desired
3) total 'going', we call that 'run'
start uset input
;;
Just threw this together to give you the idea.
That's all I have time for now....