TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Giuseppe Beatrice on May 23, 2022, 05:56:35 AM

Title: Dynamic block extraction values, visibility parameter
Post by: Giuseppe Beatrice on May 23, 2022, 05:56:35 AM
Hi guys, happy to meet you.
I have a problem with a dynamic block definition for which I can't extract the list of its visibility values, for which I have often used the successfully attached Lisp file.
I am also attaching a drawing with 3 block definitions, all containing only the "Visibility" parameter.
With the block definitions "Presa" and "Puntoluce" the program works perfectly, while with the definition "Comando" it returns nil.
Can anyone help me understand the problem?
Thank you all
Title: Re: Dynamic block extraction values, visibility parameter
Post by: mhupp on May 23, 2022, 11:49:21 AM
Reason the other two work and that one doesn't is block names are case sensitive and it needs upper case C.



Code - Auto/Visual Lisp: [Select]
  1. (setq vis1 (ESTR_VALPARAM_DYNBLKDEF "Presa" "VIS.")) ;matches
  2. (setq vis2 (ESTR_VALPARAM_DYNBLKDEF "punto luce" "VIS.")) ;matches
  3. (setq vis3 (ESTR_VALPARAM_DYNBLKDEF "comando" "VIS.")) ;doesn't match
  4. (setq vis3 (ESTR_VALPARAM_DYNBLKDEF "Comando" "VIS.")) ;matches