- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am having trouble with a simple routine that asks for main line, branch line then intersection.
Basically it's going to put an 8' 45° angle between two lines ask for a rotation then trim the branch.
Once that's done it's going to copy said line at the intersection of the next branch keep the rotation and ask for a trim.
Trouble are in order of importance.
1. I can't get the repeat (I took the repeat out in the example.) of the branch line command to work right.
2. I can't figure out how to do an apparent intersection that works well. This one is not real important as a tracking to intersection seems to do the trick.
As a side not it would be a nice but not a have to have if this would also to a 45° branch line.
Any help would be appreciated.
Thank you.
(defun c:Sanitary () ;sets main and branch lines (setq a (entsel "\nSelect main line") b (entsel "\nselect branch line") e (getpoint"\nChoose intersection of branch and main line") ) ;branch lines will be made same layer as main line. (command "LAYMCUR" a) (command "MATCHPROP" a b "") ;draws connection and places it at intersection of branch and main line. (command "line" "0,0" "@8<45" "") (setq c (entlast)) (command "copy" c "" "5.65625,0" e) (setq d (entlast)) (command "erase" c "") (command "rotate" d "" "@" pause) ;trims branch line (command "trim" d "" pause "") ;repeats bracnh line. (setq f (getpoint"\nChoose intersection of branch and main line")) (command "copy" d "" e f) (setq d (entlast)) (command "trim" d "" pause) )
Solved! Go to Solution.