TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: xinxirong on February 14, 2017, 07:23:03 AM

Title: why (setq ss (ssget '((3 . "*")))) can't work?
Post by: xinxirong on February 14, 2017, 07:23:03 AM
 (setq ss (ssget '((1 . "*")))),you can select all entities that contain dxf 1 。
but when i try to find Mtext that are over 250 words,it can't work,why?
Title: Re: why (setq ss (ssget '((3 . "*")))) can't work?
Post by: ChrisCarlson on February 14, 2017, 07:49:45 AM
I cannot recall off the top of my head but I believe there is a separate DXF code for mtext entities with a length > 250.

(setq ss (ssget (list '(0 . "MTEXT")))) should select mtext entities regardless of length.
Title: Re: why (setq ss (ssget '((3 . "*")))) can't work?
Post by: CAB on February 14, 2017, 10:36:06 AM
Try this:
Code: [Select]
(setq ss (ssget '((0 . "MTEXT")(1 . "*"))))
Title: Re: why (setq ss (ssget '((3 . "*")))) can't work?
Post by: xinxirong on February 14, 2017, 08:34:46 PM
I want to use regular expressions to search MTEXT ,like
Code: [Select]
(setq ss (ssget '((3 . "*searchString*"))))
Title: Re: why (setq ss (ssget '((3 . "*")))) can't work?
Post by: ChrisCarlson on February 15, 2017, 08:07:32 AM
I don't understand fully what you are trying to do.
Title: Re: why (setq ss (ssget '((3 . "*")))) can't work?
Post by: CAB on February 15, 2017, 12:38:08 PM
So you are trying to "Find Text String"
Title: Re: why (setq ss (ssget '((3 . "*")))) can't work?
Post by: Lee Mac on February 15, 2017, 12:45:59 PM
As far as I'm aware, I don't believe you can filter a selection based on the value of DXF group 3 for MTEXT, therefore, you will need to obtain a selection of all MTEXT entities which fulfill all other criteria, and then filter the selection further by iterating over the entities in the selection.