jbborge Posted August 31, 2009 Share Posted August 31, 2009 I’m trying to create a lisp test expression for my if then statement…& I’m stuck. Basically, all I need is: If the dwgname contains this word (MyPlan), then do this … The dwgname is typically formatted ‘xxxx~MyPlanxxxx.dwg’. The xxxx represents 4 or more letters/numbers. I tried using wildcards, but doesn’t work. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 31, 2009 Share Posted August 31, 2009 You could use the wcmatch function: Either: (wcmatch (getvar "DWGNAME") "*MyPlan*") Or (wcmatch (getvar "DWGNAME") "????~MyPlan*") Lee Quote Link to comment Share on other sites More sharing options...
jbborge Posted August 31, 2009 Author Share Posted August 31, 2009 Awesome!...worked perfectly, thanks again! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 1, 2009 Share Posted September 1, 2009 Not a problem Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.