The intent of the following lisp is to draw the footing lines on opposite sides of the foundation wall, but in some instances it draws both lines on the same side of the wall.
I have encounter this problem before in other lisps I have written but at this moment in time I am having a brain fart and can't quite figure it out. :ugly:
(Defun C:FT ( );
(setvar "cmdecho" 0)
(setq OSM (setvar "Osmode" 0)
)
(setvar "osmode" 1)
(setq PNT (getpoint "\nStarting point: ")
);
(setvar "Osmode" 128)
(setq EPT (getpoint PNT "\nPick point opposite wall:");
WDT (distance PNT EPT)
PT2 1
);
(while (/= PT2 Nil)
(setvar "osmode" 1)
(setq PT2 (getpoint PNT "\nNext Point: "))
(setvar "osmode" 0)
(if (/= PT2 Nil)
(progn
(setq AGT (angle PNT EPT)
AGB (+ ANG (angtof "180"))
DST (+ WDT 6)
PTA (polar PNT AGB 6)
PTA (polar PTA ANG 6)
PTX (polar PNT ANG (+ 6 DST))
);
(if (= OBJ Nil)
(command "_.Pline" PNT PT2 "")
(progn
(command "_.line" PNT PT2 "")
(setq SEG (entlast))
(command "_.Pedit" OBJ "J" SEG "" ""
"_.Erase" LN1 LN2 ""
) );
);if
(setq OBJ (entlast));
(command "_.Offset" 6 OBJ PTA "")
(setq LN1 (entlast));
(command "_.Offset" DST OBJ PTX "")
(setq LN2 (entlast));
(setq PNT PT2)
) );if
);while
(command "_.Erase" OBJ "")
);done
Any help would be greatly appreciated.