TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: cadman6735 on May 29, 2014, 10:53:02 AM

Title: wcmatch help?
Post by: cadman6735 on May 29, 2014, 10:53:02 AM
I can not figure out why this will not work?  "too few arguments"   :realmad: I am arguing with it and it still won't work...   :ugly:

Code: [Select]
  (vlax-for eachLayer acLayers
    (if (eq (wcmatch (strcase (vla-get-name eachLayer)) "*A-ANNO-SEAL"))
      (vla-put-freeze eachLayer :vlax-true)
    )
  )

Thanks
Title: Re: wcmatch help?
Post by: reltro on May 29, 2014, 10:56:38 AM
Hey

try this, can't test it...

Code: [Select]
(vlax-for eachLayer acLayers
    (if (wcmatch (strcase (vla-get-name eachLayer)) "*A-ANNO-SEAL")
      (vla-put-freeze eachLayer :vlax-true)
    )
  )
removed the (eq

reltro
Title: Re: wcmatch help?
Post by: cadman6735 on May 29, 2014, 10:59:24 AM
Seriously???

Thank you very much....
Title: Re: wcmatch help?
Post by: cmwade77 on May 29, 2014, 04:42:10 PM
Please note that in AutoCAD 2015, you cannot use a pattern like "*A-ANNO-SEAL" as it is treated the same as "*", which I learned the hard way yesterday. The * must be in the middle or at the end of the string only.
Title: Re: wcmatch help?
Post by: ronjonp on May 29, 2014, 04:58:39 PM
Please note that in AutoCAD 2015, you cannot use a pattern like "*A-ANNO-SEAL" as it is treated the same as "*", which I learned the hard way yesterday. The * must be in the middle or at the end of the string only.


I cannot reproduce this behavio(u)r  :?
Title: Re: wcmatch help?
Post by: cmwade77 on May 29, 2014, 07:39:10 PM
Please note that in AutoCAD 2015, you cannot use a pattern like "*A-ANNO-SEAL" as it is treated the same as "*", which I learned the hard way yesterday. The * must be in the middle or at the end of the string only.


I cannot reproduce this behavio(u)r  :?
How strange, it's what was happening to me yesterday.