Martinho Posted May 7, 2015 Share Posted May 7, 2015 Hi all.... i need some HELP....i've got the DIM arround 3000+ lines...basically its a road and i need to measure the distance of the natual ground and the distance from the natual ground to the road...its a road with arround 82Km...and i have sections of 25m...there 3000+ sections that i need to DIM... is there any LIST that can do that automatically by just selecting the lines... i put a example of what i need to DIM... i hope some one knows a lisp to help me out....tks example.zip Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 7, 2015 Share Posted May 7, 2015 Search for AutoDim with my user name in this forum and you should find what you looking for . Welcome to CADTutor. Quote Link to comment Share on other sites More sharing options...
Martinho Posted May 7, 2015 Author Share Posted May 7, 2015 HI....that is great tks alot....but i also need that but with something more...if possible...i need to get 2 DIMs from the line....not the total DIM....but the DIM of each intersection... My english isnt the beast so im trying the explain the best i can....sorry Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 8, 2015 Share Posted May 8, 2015 Something like this ? (defun c:Test (/ _pts ss ch i sn en p1 p2 sf n l 2p) ;;----------------------------------------------------;; ;; Author: Tharwat Al Shoufi ;; ;; Date: 08. May. 2015 ;; ;;----------------------------------------------------;; (if (setq ss (ssget '((0 . "LINE")))) (progn (setq ch (getvar 'cmdecho)) (setvar 'cmdecho 0) (defun _pts (lst) (if lst (cons (list (car lst) (cadr lst) (caddr lst)) (_pts (cddddr lst)) ) ) ) (repeat (setq i (sslength ss)) (setq sn (ssname ss (setq i (1- i))) en (entget sn) p1 (cdr (assoc 10 en)) p2 (cdr (assoc 11 en)) sf (ssget "_F" (list p1 p2) '((0 . "*POLYLINE"))) ) (repeat (setq n (sslength sf)) (if (setq l (vlax-invoke (vlax-ename->vla-object (ssname sf (setq n (1- n)))) 'Intersectwith (vlax-ename->vla-object sn) AcExtendnone ) ) (progn (foreach p (_pts l) (if (not (equal (distance p p1) 0. 1e-) (if (< (distance p p1) (distance p p2)) (setq 2p (list p p1)) (setq 2p (list p p2)) ) ) ) (mapcar '(lambda (j k) (command "_.dimlinear" "_non" j "_non" k "_non" j) ) (list p1 (car 2p)) (list p2 (cadr 2p)) ) ) ) ) ) (setvar 'cmdecho ch) ) ) (princ) )(vl-load-com) Quote Link to comment Share on other sites More sharing options...
Martinho Posted May 8, 2015 Author Share Posted May 8, 2015 That works fine for what i need.....tks alot...you guys are the best..... Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 8, 2015 Share Posted May 8, 2015 That works fine for what i need.....tks alot...you guys are the best..... You are welcome . 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.