Start by moving the (setvar "osmode" 0) below the floor variables...
- (setq OSM (getvar "OSMODE")) (setvar "osmode" 0) [color=red]; move from here...[/color] (defun ASC (ELEMENT ENTITY /) (cdr (assoc ELEMENT ENTITY)));;; retrieve assoc data from entity (defun DTR (A) (* pi (/ A 180.0)));;; utility to convert decimal degrees to radians(setq TREADWIDTH (getdist "\nWhat tread width?: ") LOWERFLOOR (entsel "\nSelect lower floor: ") LOWERFLOORPICK (car (cdr LOWERFLOOR)) LOWERFLOOR (entget (car LOWERFLOOR)) UPPERFLOOR (entsel "\nSelect upper floor: ") UPPERFLOORPICK (car (cdr UPPERFLOOR)) UPPERFLOOR (entget (car UPPERFLOOR)) PROBLEM 0 ) (setvar "osmode" 0) [color=red]; to here[/color]
1. Change LOWERFLOOR using GETPOINT, as you mentioned, but add NENTSELP
(nentselp (getpoint "\nSelect lower floor: "))
2. Change LOWERFLOORPICK to select the entity GETPOINT location
(cadr LOWERFLOOR)
- (setq TREADWIDTH (getdist "\nWhat tread width?: ") LOWERFLOOR (entsel "\nSelect lower floor: ") [color=red]; here...[/color] LOWERFLOORPICK (car (cdr LOWERFLOOR)) [color=red]; here...[/color] LOWERFLOOR (entget (car LOWERFLOOR)) UPPERFLOOR (entsel "\nSelect upper floor: ") UPPERFLOORPICK (car (cdr UPPERFLOOR)) UPPERFLOOR (entget (car UPPERFLOOR)) PROBLEM 0 )
See if that helps. |