mick_swartz Posted February 9, 2016 Posted February 9, 2016 Hi all, So I'll preface this, with I'm not terribly familiar with LISP. Now that we have that out of the way, we currently have a LISP routine that updates all of the text styles used in a drawing to a common font, Romans. However, this obviously only works on one individual drawing at a time. There are times where we can get hundreds of drawings from vendors that need to be updated, and doing this one by one is a bit cumbersome to say the least. Is there a way to get a LISP routine to execute on an entire folder? I've been searching for a while, but haven't found a solution that seems to work. I know I could write a batch file and a script and run them, but I would really like all the code to be contained in one .lsp file if possible. Thanks for the help! Quote
Lee Mac Posted February 9, 2016 Posted February 9, 2016 You could use my old Script Writer program to perform this task. Quote
mick_swartz Posted March 3, 2016 Author Posted March 3, 2016 You could use my old Script Writer program to perform this task. Worked like a charm. Thanks for that! Quote
JWisniowski Posted December 11, 2023 Posted December 11, 2023 On 3/3/2016 at 5:37 PM, Lee Mac said: Excellent to hear, you're welcome! Lee, I have tried to utilize the Script Writer. It will open the first drawing but it won't close & open the next. _.open *file* _.KCOBK _.close Quote
Lee Mac Posted December 11, 2023 Posted December 11, 2023 2 hours ago, JWisniowski said: Lee, I have tried to utilize the Script Writer. It will open the first drawing but it won't close & open the next. _.open *file* _.KCOBK _.close As I put in my response to your email - I would suggest enabling command line logging (LOGFILEON) and then reviewing the command line history for the opened drawing to understand why the script is terminating early. Quote
JWisniowski Posted December 12, 2023 Posted December 12, 2023 17 hours ago, Lee Mac said: As I put in my response to your email - I would suggest enabling command line logging (LOGFILEON) and then reviewing the command line history for the opened drawing to understand why the script is terminating early. Never got your email. Weird. I have looked at the logs and, I apologize as I am not super well versed in all this. I know enough to be minimally dangerous. It appears as though everything is working up until my .scr file runs the final command _qsave. After that I have (2) blank Command: lines. For some reason, my script line will not execute the _.close function. I may find the answer before you would be gracious enough to reply but any additional help would be appreciated!! Quote
Steven P Posted December 12, 2023 Posted December 12, 2023 Are you able to post your LISP code in case there is something in that? Quote
JWisniowski Posted December 12, 2023 Posted December 12, 2023 13 minutes ago, Steven P said: Are you able to post your LISP code in case there is something in that? ;Revit to CAD Background Change (defun c:KCOBK () (progn (c:BurstAllBlocks) hp (c:DeleteHatchByPatternName) (c:ChangeAllHatchesToNone) (command "SETBYLAYER" "All" "" "" "") (c:PurgeALL) ) (princ) ) ;-defun Quote
BIGAL Posted December 12, 2023 Posted December 12, 2023 (edited) is the HP a typo ? or is it part of (c:BurstAllBlocks) All the lisps need to be set to run and not have a command input. Are all the programs preloaded ? Maybe in start up suite, If not load then run. Edited December 12, 2023 by BIGAL 1 Quote
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.