LISP QSELECT THEN BRING TO FRONT

LISP QSELECT THEN BRING TO FRONT

Anonymous
Not applicable
2,342 Views
9 Replies
Message 1 of 10

LISP QSELECT THEN BRING TO FRONT

Anonymous
Not applicable

Can someone write me a lisp that would use the quick select command to find all leaders with layer name "E-ANNO-TEXT" then those selected will bring to front. Thanks in advance.

0 Likes
Accepted solutions (1)
2,343 Views
9 Replies
Replies (9)
Message 2 of 10

vinodkl
Mentor
Mentor

May be this would help you out:

http://forums.augi.com/showthread.php?42864-lisp-routine-which-will-pick-specific-layers-amp-bring-t...

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)
Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
0 Likes
Message 3 of 10

StephenThomasGrace
Advocate
Advocate
Accepted solution

Give this a try.

Load

Type LeaderFront or LF to run

-steve

Message 4 of 10

Anonymous
Not applicable

Thanks Steve!

0 Likes
Message 5 of 10

Anonymous
Not applicable

What if I want to bring to front all LINES & ARC  with "E-ANNO-TEXT" layer?

0 Likes
Message 6 of 10

StephenThomasGrace
Advocate
Advocate

Then the ssget, which is the selection set filter, gets update to something like this:

(ssget "_X" '((-4 . "<OR")(0 . "LEADER")(0 . "LINE")(0 . "ARC")(-4 . "OR>")(8 . "E-ANNO-TEXT")))

 

; if entity is a Leader, a line or and arc... and on layer E-ANNO-TEXT

I updated the lisp and named it AnnoFront since it is not just leaders now

so AnnoFront or AF will run it

enjoy

-steve

0 Likes
Message 7 of 10

Jemauk
Advocate
Advocate

@StephenThomasGrace

Thanks for posting this Steve! I need it to do just text on some hand drawn contours. So I would need to modify it to be:

(setq Text (ssget "_X" '((0 . "TEXT")(8 . "-PROPOSED CONTOURS"))))

Would this be correct?

 

Thank you,

Joseph Mauk

C3D19

0 Likes
Message 8 of 10

Kent1Cooper
Consultant
Consultant

@StephenThomasGrace wrote:

Then the ssget, which is the selection set filter, gets update to something like this:

(ssget "_X" '((-4 . "<OR")(0 . "LEADER")(0 . "LINE")(0 . "ARC")(-4 . "OR>")(8 . "E-ANNO-TEXT")))

 

; if entity is a Leader, a line or and arc... and on layer E-ANNO-TEXT

....


 

[I didn't see this back then, but with the thread revived, I'll point out that this can be simplified by using a comma-delimited string of multiple entity type names (and the same is applicable for any text-string values, such as Layer names), without  the OR wrappers around separate entries:]

 

(ssget "_X" '((0 . "LEADER,LINE,ARC") (8 . "E-ANNO-TEXT")))

Kent Cooper, AIA
Message 9 of 10

Kent1Cooper
Consultant
Consultant

@Jemauk wrote:

@StephenThomasGrace

.... I need it to do just text on some hand drawn contours. So I would need to modify it to be:

(setq Text (ssget "_X" '((0 . "TEXT")(8 . "-PROPOSED CONTOURS"))))

Would this be correct? ....


Yes.

Kent Cooper, AIA
Message 10 of 10

Jemauk
Advocate
Advocate

Thank you @StephenThomasGrace!

0 Likes