I need some help from someone on the Distance command in AutoLisp.

assume: (setq PT (getpoint )) and (setq E1 (entsel)) where E1 is a
line.

I want to get the distance from the point PT "perpendicular" to the user selected line E1

I have tried something like this, but doesn't work: (setq D ( distance PT "per" E1 ) ) and other various variations but can't figure it out.

Thanks for any help Jarvis

assume: (setq PT (getpoint )) and (setq E1 (entsel)) where E1 is a

I want to get the distance from the point PT "perpendicular" to the user selected line E1

I have tried something like this, but doesn't work: (setq D ( distance PT "per" E1 ) ) and other various variations but can't figure it out.

Thanks for any help Jarvis