lucky9 Posted June 21, 2018 Share Posted June 21, 2018 I want to fetch the RL at a junction point/Node ( where 2 or more lines meet) and the end node/point, In my survey data there are 4 to 5 RL's given and I have to pic the max RL nearest to the junction or dead end node/point I need a lisp that can auto scan the lines pic RL place it at each junction and end node. Here is an example: in the given image I have shown the junction and dead end node with a circle. here , there are 2 Dead end nodes and 1 junction Node. The result I want is that after identifying the junction and dead end node the program would pic the highest RL around the Junction and dead end node. the text in green are RLs and text in Pink is the max RL at each Junction/node Regards, Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 23, 2018 Share Posted June 23, 2018 All you need is a simple lisp that picks a number of text items and just looks at the value, returning the maximum and maybe change colour and zoom in. Do you have any lisp experience ? Start with the 1st step just window around the junctions making a slecetion set. Quote Link to comment Share on other sites More sharing options...
lucky9 Posted June 23, 2018 Author Share Posted June 23, 2018 All you need is a simple lisp that picks a number of text items and just looks at the value, returning the maximum and maybe change colour and zoom in. Do you have any lisp experience ? Start with the 1st step just window around the junctions making a slecetion set. I can write code in VBA, but I'm in a learning stage at LISP programming. It's looks pretty challenging and I'm still struggling with it. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 24, 2018 Share Posted June 24, 2018 Here is something to have a look at. ; simple compare text formax value ; By Alan H June 2018 (defun C:maxval ( / rad pt1 obj I xy co-ordsxy ss) (vl-load-com) (setq rad (getreal "Enter radius" )) (While (setq pt1 (getpoint "Pick point")) (setvar 'osmode 0) (setq co-ordsxy '()) (command "polygon" 25 pt1 "I" (* rad 0.9)) (setq obj2 (vlax-ename->vla-object (entlast))) (setq co-ords (vlax-safearray->list (vlax-variant-value (vlax-get-property obj2 "Coordinates" )))) (setq I 0) (repeat (/(length co-ords) 2) (setq xy (list (nth i co-ords)(nth (+ I 1) co-ords) )) (setq co-ordsxy (cons xy co-ordsxy)) (setq I (+ I 2)) ) (vla-delete obj2) (setq ss (ssget "wp" co-ordsxy (list (cons 0 "*TEXT")))) (setq maxv 0.0) (repeat (setq x (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq x (- x 1))))) (setq val (atof (vla-get-textstring obj ))) (if (/= val nil) (if (< maxv val)(setq maxv val)) ) ) (alert (strcat "max val is " (rtos maxv 2 3))) (setq ss nil) ) ) 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.