Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

help:filter line length in assembly drawing 1

Status
Not open for further replies.

Betterman

Mechanical
Dec 4, 2003
2
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!!!
 
Replies continue below

Recommended for you

You could use "qselect" to select lines of specified length. First select lines with a length >49, with check in box "include in new selection set". Then select lines >51, check "exclude from new selection set". All lines of length 49 to 51 should be highlighted and gripped.
 
Good input, It solve my problem. The way i try is:

"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......
 
Here's a lisp routine to select& grip lines based on min & max lengths:

(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)
)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor