help:filter line length in assembly drawing
help:filter line length in assembly drawing
(OP)
hi, I am facing 1 problem when I assembly the machine. There is about 1 thousand parts already manufactured. The parts was scatter without the proper tag and I just don't know where it should be. Since I have the assembly drawing in autocad, so I think filter command can help me to filter out where the part is. eg the length/width/height of the part is 50mm, then i can filter the entire drawing with line above 49mm and lind below 51mm to get the part out.
I cannot use the line above 49mm only because there is a bunch of line above the 49mm.
I find that filter command (line)is fussy and I dont know how to use it.
I know if I want to choose the filter the circle then is easy, but it is better to use filter line.
Do u understand what i try to say?
I have been tire in assembly machine if no such help, it is tedious.
help!!!
I cannot use the line above 49mm only because there is a bunch of line above the 49mm.
I find that filter command (line)is fussy and I dont know how to use it.
I know if I want to choose the filter the circle then is easy, but it is better to use filter line.
Do u understand what i try to say?
I have been tire in assembly machine if no such help, it is tedious.
help!!!





RE: help:filter line length in assembly drawing
RE: help:filter line length in assembly drawing
"use "qselect" to select lines of specified length. First select lines with a length >49, . Then select lines >51, make sure on top "selected drawing" is selected (not entire drawing". All lines of length 49 to 51 should be highlighted and gripped.
How ever, it is two step to do that. and I start to think is there any way one short to sort out what i want? like using autolisp, maybe..or using filter......
RE: help:filter line length in assembly drawing
(princ "\nStart with LFILT")
(defun c:LFILT ()
(setq ssfilt (ssadd))
(initget 5)
(setq LMIN (getreal "\nEnter minimum length: "))
(initget 5)
(setq LMAX (getreal "\nEnter maximum length: "))
(princ "\nSelect lines to filter: ")
(setq ss1 (ssget '((0 . "LINE"))))
(setq count 0)
(repeat (sslength ss1)
(setq ename (ssname ss1 count))
(setq StPt (cdr (assoc 10 (entget ename))))
(setq EndPt (cdr (assoc 11 (entget ename))))
(setq LenLine (distance StPt EndPt))
(if (<= LMIN LenLine LMAX)
(ssadd ename ssfilt)
)
(setq Count (1+ Count))
);repeat
(sssetfirst nil ssfilt)
(princ)
)