GDF for future reference (entget (entlast)) will get the last entity but you did not save it to a variable so you can use it, (setq lline (entget (entlast))). But like Lee its the last entity created so you must remember to do it straight after making an entity that you know what type it is.