PDA

View Full Version : Need Help With An 'If - Then' Lisp


amoroz
2008-07-22, 08:45 PM
I need some help coming up with a routine that will look at the current drawing filename, if it's filename contains "site" or "title", I want it to go to model tab.

Thanks in advance for your help.

Opie
2008-07-22, 08:51 PM
Look at the wcmatch function in the AutoCAD Developer Help.

'gile'
2008-07-22, 11:28 PM
Hi,

Or the vl-string-search function

(if (or (vl-string-search "SITE" (strcase (getvar 'dwgname)))
(vl-string-search "TITLE" (strcase (getvar 'dwgname)))
)
(setvar 'ctab "Model")
)