Author Topic: wcmatch help?  (Read 2445 times)

0 Members and 1 Guest are viewing this topic.

cadman6735

  • Guest
wcmatch help?
« 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

reltro

  • Guest
Re: wcmatch help?
« Reply #1 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

cadman6735

  • Guest
Re: wcmatch help?
« Reply #2 on: May 29, 2014, 10:59:24 AM »
Seriously???

Thank you very much....

cmwade77

  • Swamp Rat
  • Posts: 1427
Re: wcmatch help?
« Reply #3 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.

ronjonp

  • Needs a day job
  • Posts: 7524
Re: wcmatch help?
« Reply #4 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  :?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

cmwade77

  • Swamp Rat
  • Posts: 1427
Re: wcmatch help?
« Reply #5 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.