ghostware Posted April 7, 2010 Share Posted April 7, 2010 Allows user to draw slope lines. SLOPE-LINE.LSP 1 1 Quote Link to comment Share on other sites More sharing options...
Rojek Posted April 7, 2010 Share Posted April 7, 2010 I wrote something similar in VBA. I used "intersectwith" method but had a problem with embankment with curvature bigger than 90deg. (I know what problem it is and how to solve it but don't have time to wrote it ;/) does it work in yours code? ...and what will happen if bottom slope will be shorter than upper? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 8, 2010 Share Posted April 8, 2010 Theres some other programs here also search for "batters" Quote Link to comment Share on other sites More sharing options...
pule Posted September 8, 2010 Share Posted September 8, 2010 Thank you! Works great. Quote Link to comment Share on other sites More sharing options...
Emgeomap86 Posted October 30, 2010 Share Posted October 30, 2010 thank you Bro... Quote Link to comment Share on other sites More sharing options...
anba921 Posted March 24, 2011 Share Posted March 24, 2011 dude i would like to draw slope with different symbol..like half circle.. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 25, 2011 Share Posted March 25, 2011 See above search for "batters" it uses a block for the downhill direction so you could change the block. Quote Link to comment Share on other sites More sharing options...
ao357434 Posted March 30, 2011 Share Posted March 30, 2011 so nice bro, thanks Quote Link to comment Share on other sites More sharing options...
wemoro Posted November 29, 2011 Share Posted November 29, 2011 Thanks a lot guy !!!!!!!!!!!!! Quote Link to comment Share on other sites More sharing options...
woodman78 Posted November 30, 2011 Share Posted November 30, 2011 Ghostware, very nice lisp. Could it be modified easily to draw triangles rather than lines? Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 30, 2011 Share Posted November 30, 2011 Ghostware, very nice lisp. Could it be modified easily to draw triangles rather than lines? See post #7 by BIGAL. Quote Link to comment Share on other sites More sharing options...
kanyak Posted March 29, 2012 Share Posted March 29, 2012 i cant use this lsp on my map 3d 2010. i try with 2 pline (and 2 spline), but i cant. im taking this report "; error: no function definition: VLAX-ENAME->VLA-OBJECT" Pls Help Me!! Quote Link to comment Share on other sites More sharing options...
alanjt Posted March 29, 2012 Share Posted March 29, 2012 i cant use this lsp on my map 3d 2010. i try with 2 pline (and 2 spline), but i cant. im taking this report "; error: no function definition: VLAX-ENAME->VLA-OBJECT" Pls Help Me!! add (vl-load-com) to the top of the code. Quote Link to comment Share on other sites More sharing options...
transcad Posted March 30, 2012 Share Posted March 30, 2012 Thanks, nice lisp! Seems to work slowly with big splines...why? Quote Link to comment Share on other sites More sharing options...
teknomatika Posted March 30, 2012 Share Posted March 30, 2012 Excellent. For my use afstand changed the variable to a real value. Allows greater freedom in the scale factor. It is much like another routine dtal.vlx (setq afstand (getreal "\ nLine slope distance:")) DTAL.zip Quote Link to comment Share on other sites More sharing options...
jfrancofarias Posted August 26, 2013 Share Posted August 26, 2013 It works perfectly. I used it for detailing a digitalized 20 km corridor Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted August 26, 2013 Share Posted August 26, 2013 Here is my revision... Fixed bug with splines - it should finish routine; you shouldn't finish it when hitting ESC... Now is OK... M.R. SLOPE-LINE.lsp Quote Link to comment Share on other sites More sharing options...
arestotle Posted January 18, 2015 Share Posted January 18, 2015 ghostware thanks dude Quote Link to comment Share on other sites More sharing options...
robert06 Posted April 15, 2015 Share Posted April 15, 2015 Hi, What should be changed in slope-line.lsp to have the second tick 30% in length of the first one not 50%. thanks! Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted April 15, 2015 Share Posted April 15, 2015 Look into red comment : (defun c:slope-line (/ is-on-pl? talud_boven talud_onder afstand afstand_totaal count p1 p2 kleur ) (defun is-on-pl? (ename pkt /) (vl-catch-all-apply 'vlax-curve-getdistatpoint (list ename pkt ) ;_ end of list ) ;_ end of vlax-curve-getdistatpoint pkt ) ;_ end defun (vl-load-com) (if (and (setq talud_boven (car (entsel "\nSelect top slope: "))) (setq talud_onder (car (entsel "\nSelect bottom slope: "))) (setq afstand (getdist "\nLine slope distance:")) (setq kleur (acad_colordlg ) ) ;_ end of and (progn (setq afstand_totaal 0) (setq count 0) (setq p1 (vlax-curve-getstartpoint talud_boven ) ;_ end of vlax-curve-getstartpoint ) ;_ end of setq (while p1 (if (equal (/ count 2.0) (fix (/ count 2.0)) 0.001) (setq p2 (vlax-curve-getclosestpointto talud_onder p1 ) ;_ end of vlax-curve-getclosestpointto ) ;_ end of setq (setq p2 (mapcar '(lambda (x) (/ x 2)) [color=red];;; Change (/ x 2) to (* x 0.3) for 30% of distances ;;;[/color] (mapcar '+ p1 (vlax-curve-getclosestpointto talud_onder p1 ) ;_ end of vlax-curve-getclosestpointto ) ;_ end of mapcar ) ;_ end of mapcar ) ;_ end of setq ) ;_ end of if (entmake (list '(0 . "LINE") (cons 10 p1) (cons 11 p2) ;'(62 . 1) ; standaard kleur (cons 62 kleur) ; kleur dia dialog instellen ) ;_ end of list ) ;_ end of entmake (if (not (vl-catch-all-error-p (setq p1 (is-on-pl? talud_boven (vl-catch-all-apply 'vlax-curve-getpointatdist (list talud_boven (if (< (setq afstand_totaal (+ afstand_totaal afstand) ) (vlax-curve-getdistatpoint talud_boven (vlax-curve-getendpoint talud_boven) ) ) afstand_totaal nil ) ;_ end of if ) ;_ end of list ) ;_ end of vl-catch-all-apply ) ;_ end of is-on-pl? ) ;_ end of setq ) ;_ end of vl-catch-all-error-p ) ;_ end of not p1 (setq p1 nil) ) ;_ end of if (setq count (1+ count)) ) ;_ end of while ) ;_ end of progn ) ;_ end of if (princ) ) ;_ end of defun HTH, M.R. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.