Alert Box pops up prior to Cond Script running
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Alert Box pops up prior to Cond Script running

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
Coyote
Guest





Posted: Mon Jan 03, 2005 8:49 pm    Post subject: Alert Box pops up prior to Cond Script running Reply with quote

Good Morning Everyone,

I'm stumped as to why my Alert Box pops up prior to the condition statement running. In the code below if either of the first 2 conditions are met then I want the commands executed and after that have the Alert "Database Updated" displayed.

(cond
((= FileSel 6)
(setq FileLst (dos_getfilem "Select Shop Drawings To Retrieve Mark Numbers" "C:\\" "Drawing Files (*.DWG)|2_*.dwg"))
;;; The line Above Prompts User to Select Dwgs To Create List (Result Ex: = "C:\\ABC-1234\\" "2_01.dwg" "2_05.dwg")
(setq ProjFldr (car Filelst)) ; Sets Variable To The Project Folder (Result Ex: "C:\\ABC-1234\\")
(setq DwgList (cdr Filelst)) ; Sets Variable for Dwg List (Result Ex: "2_01.dwg" "2_05.dwg")
(setq ScrFileNm (strcat (strcat ProjFldr "Misc\\Autocount\\") "Mark_Number_Batch.scr"))
(setq ScrFile (open ScrFileNm "w"))
(foreach d DwgList ; Create A Loop To Run The Code Below On Each Dwg In The List
(setq CurDwg (strcat ProjFldr d)) ; Sets Variable For Dwg To Be Opened (Result Ex: = "C:\\ABC-1234\\2_01.dwg")
(write-line (strcat "open \"" CurDwg "\"") ScrFile)
(write-line "(load \"C:/Autocount/DB_Get_Mark_Numbers.lsp\")" ScrFile)
(write-line "(load \"C:/Autocount/ED_Mark_Number_Data.lsp\")" ScrFile)
(write-line "getmknums" ScrFile)
(write-line ".qsave" ScrFile)
(write-line ".Close" ScrFile)
); End Foreach
(close ScrFile)
(command "_.script" ScrFileNm)
); End First Condition
((= FileSel 3)
(load "C:/Autocount/DB_Get_Mark_Numbers")
(load "C:/Autocount/ED_Mark_Number_Data")
(princ)
(C:getmknums)
); End Second Cond
(( = FileSel 1)
(Alert "Command Canceled And Database Not Updated")
); End Third Cond
); End Cond Loop
(if (/= FileSel 1)
(Alert "Database Has Been Updated With Mark Number Data")
);End If Loop


Thanks In Advance
Coyote

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB