Well maybe not...but It is certanly challenging mine..
What I want is to have a set block...and have that block inserted multiple times across a given distance...
Sounds Easy but I cant figure it out.
So far I have been able to get the first point get the second point, get the angle (0,90,180,270) and insert the correct block for that angle...but I can only get it to insert once....actually I have no clue how to repeat the insert command...But if it is repeated it needs to change the postion of the block so tha the ends meet up...in this case the length of the block is 37.75
Here is my code so far...
(defun C:race ()
(setq P1 (getpoint "Start Point: "))
(setq P2 (getdist P1 "End Point: "))
(setq A (getangle P1 "Which Direction (0,90,180,270): "))
(if (= A 0) (command "INSERT" "G:/CHI-CUSTOMCAD/BLOCKS/TECHNOLOGY/TC/raceway-r.dwg" P1 "1" "1" "0"))
(if (= A pi) (command "INSERT" "G:/CHI-CUSTOMCAD/BLOCKS/TECHNOLOGY/TC/raceway-l.dwg" P1 "1" "1" "0"))
(if (= A (/ pi 2)) (command "INSERT" "G:/CHI-CUSTOMCAD/BLOCKS/TECHNOLOGY/TC/raceway-up.dwg" P1 "1" "1" "0"))
(if (= A (* 3 (/ pi 2))) (command "INSERT" "G:/CHI-CUSTOMCAD/BLOCKS/TECHNOLOGY/TC/raceway-dwn.dwg" P1 "1" "1" "0"))
IF there a better way of coding this I would be glad to listen. Also if you know of a way to have this work with any angle I would glad to listen to that too.