So this is my first time in a very long time to actually write a lisp file from start to finish. I did a lot of debugging to see if it worked and it did. however, the debugging process was only with my machine. It worked every time. Now it hangs up a lot at z-axis condition. Prior to this point it checks whether they are lines or plines. it then converts plines to lines. It then checks the z-axis and will notify people if the z-axis is not at zero and exit.
I have checked several of the files and they z-axis is at 0.00000000. However when i run the program on these files the z-axis will give me something different than what i see on the properties. The last time i checked a file, it gave a z-axis of 2.1something when running the lisp but it was at 0.00000000.
Here is the Z-axis part of the file.
Code:
(setq
ssBetweenPoints (ssget "c" Point1 Point2)
;;line1
Line1Data (entget (ssname ssBetweenPoints 1))
Line1_Point1 (cdr (assoc 10 Line1Data))
Line1_Point2 (cdr (assoc 11 Line1Data))
;;line 2
Line2Data (entget (ssname ssBetweenPoints 0))
Line2_Point1 (cdr (assoc 10 Line2Data))
Line2_Point2 (cdr (assoc 11 Line2Data))
)
(if (OR (/= 0.0 (nth 2 Line1_Point1))
(/= 0.0 (nth 2 Line1_Point2))
(/= 0.0 (nth 2 Line2_Point1))
(/= 0.0 (nth 2 Line2_Point2))
)
(progn
(alert "1 or more line have a z-axis not a 0.0")
(exit)
)
)