I have no idea if I am titling this thread correctly but it was the best I could do.
Short version: when told to draw a line from ptxx (a var containing x and y coords) AutoCAD starts from some point other than what is stored in ptxx....sometimes!!!!
Long version:
I have a program giving me trouble, or so I thought. Drawing a fairly simple shape of 20 points connected with lines or even 1 pline. Program runs perfectly one to several times in a row then draws something unexpected one or several times. Seems to be random and after much effort I can not isolate any event that seems to cause this. Rewrote the program a couple times in different ways only to get the same result. Now I think it may not be the program and may be my system.
Turning off all local declarations and running the program until it does something unexpected, and then...
From the command line: !pt10 , !pt11 , !pt12 ,OR !pt13 returns (13.0 16.0) , (13.0 13.0) , (16.0 13.0) , (16.0 12.375) respectively. These are 4 separate pts with different values and all correct as to what would be expected from the code generating them.
Now from the command line: (command "line" some-point) using pt10, 11, 12, or 13 ALL FOUR start the line command at the first point of (16.0 13.0). The correct location for only pt12.
What am I missing?
Ideas?
Running AutoCAD Architectural 2011 with no other known bugs on a decent machine with Windows 10.
;; attached files
YelloHelp.lsp has the code if you would like to see it
Acceptable.jpg shows the only two basic shapes that should be generated by this code. Sizes and chamfer angles may vary.
Thanks