TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: JohnSnow on May 03, 2022, 10:51:38 PM

Title: Any workaround to add ename keys in filter-list of ssget?
Post by: JohnSnow on May 03, 2022, 10:51:38 PM
Hi,

After using vlax-ldata method to assign keys to enames. Is there any way to add these these keys in filter-list of ssget OR do I have to ssget all the entities and loop? Is there any workaround to get the entities with the same keys alot quicker like the way ssget with filter-list works instead of looping one by one? Thanks
Title: Re: Any workaround to add ename keys in filter-list of ssget?
Post by: mhupp on May 04, 2022, 09:28:08 AM
I think you want to be using xdata for that. then depending on what 1000's value you are storing you could use that in ssget to filter to those entity's

Code - Auto/Visual Lisp: [Select]
  1. (setq ss (ssget '((1000 . ""Kenny is great""))))

Tutorial
https://www.afralisp.net/autolisp/tutorials/extended-entity-data-part-1.php
https://www.afralisp.net/autolisp/tutorials/extended-entity-data-part-2.php

Title: Re: Any workaround to add ename keys in filter-list of ssget?
Post by: JohnSnow on May 05, 2022, 02:57:03 AM
I think you want to be using xdata for that. then depending on what 1000's value you are storing you could use that in ssget to filter to those entity's

Code - Auto/Visual Lisp: [Select]
  1. (setq ss (ssget '((1000 . ""Kenny is great""))))

Tutorial
https://www.afralisp.net/autolisp/tutorials/extended-entity-data-part-1.php
https://www.afralisp.net/autolisp/tutorials/extended-entity-data-part-2.php

Thank you.
Does Visual lisp provide similar method to ssget to filter keys in drawing dictionary?