Context:I have a lisp function that takes 2 arguments. I also have a Script generator. I would like to use this lisp function with my script generator
The script generator takes 2 arguments; the
lisp function name and a
single argument.
I have long been unsure how to handle using my script generator with functions that take more than 1 argument.
Please help me adjust my script generator to handle multiple arguments: The call I make to make script generator is: (C:BG_Scr_Generator "MyLispFunctionName" Argument)
I am so confused at this point after trying for hours on how to take a list of arguments and pass them to my script generator and for it to do the write line properly.
Due to my confusion right now Im not even going to say what I have tried.
Please help! Thank you!
Files Included:Script Generator - I need help with line 136 (of the attached file, is a different number in the partial code below)
Block Replace - Calls the script Generator on line 49 (of attached file)
Image that clarifies the question - Makes it super easy to understand the question
;;--------------------------------Sub Functions--------------------------------------;;
;===========================================================
; 26/Jul/2019 01:50 PM[Friday] AUTHOR: Brandon Gum
;--
;DESCRIPTION: Writes to the script file we are creating
;===========================================================
(defun BG:ScrGen
( dwg lispFile arg fil
/ ) ;;;--- Send the open command to the script file
(strcat ;figured out the syntax from leeMac's BatchAttributeEditor, hardest thing of my life "_.open \"" dwg "\" "
"(setvar \"filedia\" 0) "
"(C:" lispfile ") "
"(while (= 1 (getvar \"cmdactive\")) (command pause)) "
"_.qsave"
);end of strcat
fil ;the file to write it to
);end of write-line
);end of progn
;--else--
(strcat ;figured out the syntax from leeMac's BatchAttributeEditor, hardest thing of my life "_.open \"" dwg "\" "
"(setvar \"filedia\" 0) "
"(C:" lispfile
" " (vl-prin1-to-string arg
) ") " ;HELP ME FIGURE OUT HOW TO PASS MORE THAN 1 ARGUMENT HERE "_.qsave"
);end of strcat
fil ;the file to write it to
);end of write-line
);end of progn
);end of if
;;;--- Send the open command to the script file
;(write-line (strcat "(setvar \"filedia\" 0)") fil);change the filedia before opening next dwg to surpress the open dcl box
;(write-line "_.close" fil)
);end of function
;===================================================================
EDIT (John): Fixed code tags.