I have had this code written for several years, and used functionally for a variety of aspects. The basics of the code is that it inserts blocks into a drawing based on node points and rotate blocks based on number in the syntax, but to be perpendicular to a line. All of that portion works.
Now, I am trying to expand the code to move certain blocks to the nearest line. In the syntax, there is a 0 or 1 for this parameter. Those blocks with a 1 need to be moved.
I have been able to get the LISP to work, but only for one node. If there are multiple nodes, bad things happen. I've attached the current code, as it is rather long, and a test drawing.
Essentially, what is going on is that when there are multiple nodes, it is placing the first one correctly. Then it is placing, followed up with deleting, following blocks. When putting in a different type of block, for what we use for light representation, it is get stretched ALOT.
Any help in getting these function to work out properly is appreciated.