• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

select polylines according to the required quota

  • Thread starter Thread starter micheledag
  • Start date Start date

micheledag

Guest
if it is possible, the problem is this.
I have hundreds of polylines (also 2d or 3d) at different altitudes (level curves). they are not continuous but broken, so e.g. I have several polylines at altitude 200, different at altitude 210, etc, which form me different km of territory.
I would like to select all the polylines, but those that stand at the odds that I choose, automatically and quickly; I'll explain better.
the routine asks me "select quotas" and I type, e.g., 20, 100, 180, 260, 340 in sequence, maybe separating with comma the chosen quotas (or I write the first quota and send, I write the second quota and send, etc,) and all the polylines to the specified quotas are selected.
Stop.
At this point I am happy because almost immediately, without going to select them once at a time, I have the selection of polylines that I need for my later uses (e.g. changing the color or eliminating them, etc.).
thanks to who can help me.
greetings
 
But am I really at that? I mean the z of those pline, line etc is set to the value of the quota?
If you, beyond the lisp street, you can do it by simply quotating the view of the dwg through the old _ddvpoint

put the side inclination to 0 and you will see your dwg in "high" and you can selezinate everything with simplicity
 
If you had short lines and high difference in altitude, the command you mentioned would be fine.
Unfortunately as I said I have km of polylines in small difference of altitude, and their selection is very difficult immediately.
Thanks anyway!
 
use the selerapid command, as type of object you choose from the list 'polliline', as properties you choose ' elevation'. in the 'value' box, enter the value of the desired quota.
 
Yeah, that's almost what I want.
the only problem is that I have to continually return to selerapid command (just one sending;) and re-go search the elevation between the properties.
practically if you could avoid this passage would be great.
But I'm satisfied! ! ! !
Thank you!
 
per polilinee "leggere", look funge :smile:
Code:
(defun c:selpoly ( / sel tot elev series poly n )
(Sectq sel (ssadd)
(setq tot 0)
(sing)
(progn)
(if (setq elev (getreal "\nquota of polylines to be selected (order=end): ")
(if (not (member elev series)
(progn)
(setq series (cons elev series)
(if (setq poly (ssget "_x" (list '(0 . "lwpolyline") (cons 38 elev))))
(progn)
(repeat (setq n (sslength poly)
(setq sel (ssadd) (ssname poly (setq n (1-n)))
)
(sssetfirst nil sel)
(princ)
(strcat "\nap n° "
(itoa (sslength poly)
" polylinee to the selection group ("
(itoa (setq tot (+)))
"total"
)
)
)
(princ)
(strcat "\nnessuna polilinea found with quota "
(rtos elev 2 2) "
(Tot)
"total"
)
)
)

)
(princ (strcat "\nquota already indicated, no added polyline (itoa tot) "total)"))
)
)
)
)
(sssetfirst nil sel)
(princ)
)
 
if then you want to "filtrate" only a part of the drawing beads.. .
Code:
(defun c:selpolypart (/ sel tot elev series poly n )
(Sectq sel (ssadd)
(setq tot 0)
(sing)
(progn)
(if (setq elev (getreal "\nquota of polylines to be selected (order=end): ")
(if (not (member elev series)
(progn)
(setq series (cons elev series)
(if (setq poly (ssget (list '(0 . "lwpolyline") (cons 38 elev))))
(progn)
(repeat (setq n (sslength poly)
(setq sel (ssadd) (ssname poly (setq n (1-n)))
)
(sssetfirst nil sel)
(princ)
(strcat "\nap n° "
(itoa (sslength poly)
" polylinee to the selection group ("
(itoa (setq tot (+)))
"total"
)
)
)
(princ)
(strcat "\nnessuna polilinea found with quota "
(rtos elev 2 2) "
(Tot)
"total"
)
)
)

)
(princ (strcat "\nquota already indicated, no added polylinea (" (itoa tot) "

Total)
)
)
)
)
(sssetfirst nil sel)
(princ)
)
(princ "\nselect pline at a given quota (extraction) - use selpolypart - 15-02-2015 gp")
 
Well, if he keeps writing lisp, we'll call him lee gp.
If he were to devote himself to martial arts, we will call him gippi lee:biggrin:
 
...the gp dinners accumulate. . .
The mouth is a great tool. I'm kidding.
I have the chance to check, from 11 to 14 May I am "in the area", because we are three mouths... :tongue:


gp, they're gonna call him lee gp in a while.
Well, if he keeps writing lisp, we'll call him lee gp.
If he were to devote himself to martial arts, we will call him gippi lee
oh... state a drink' per c... :biggrin:
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top