Look at the part of a lisp I have written below
At one part of the lisp, it checks to see if the file a particular number. If so, then it quits.
The list of drawings shown below is much, much longer than shown, but you get the idea.
(setq pfdcheck (getvar "dwgname"))
(if (or
(= pfdcheck "WN49090010001.dwg")
(= pfdcheck "WN49090010002.dwg")
(= pfdcheck "WN49090010003.dwg")
(= pfdcheck "WN49090010004.dwg")
(= pfdcheck "WN49090010005.dwg")
(= pfdcheck "WN49090010006.dwg")
(= pfdcheck "WN49090010007.dwg")
(= pfdcheck "WN49090010008.dwg")
)
(progn
(prompt "\nNot a P&ID Drawing.")
(prompt "\n ")
(princ)
(quit)
);end progn
)
What I’m wondering is, can I do a wildcard type scenario. The first 10000 series drawings have been reserved for PFD’s, and I want to exclude them from the next part of the lisp.
So what I’m trying to convey is could I do something like:
(= pfdcheck "WN4909001****.dwg")
Instead of having a long list of drawings that i have to manage as new files get added.
Any help or hints would be greatly appreciated
Regards
Diarmuid