hosyn Posted July 12, 2020 Posted July 12, 2020 (edited) Hello Guys I want to make a lisp file for getting command lisp and produce a file with that command as follows : (defun c:lspfilemake(/ mmm) (setq mmm (getstring T "lsp command :")) (setq filename ( strcat mmm ".lsp") (setq file (findfile filename)) (if (not file) (setq file (open filename "w")) );if (write-line (strcat "(defun c:" mmm ".lsp" file)) (close file) ) its mean that (c:bb) ---->> bb.lsp This is my all my mind about it, for any helping would be appreciated Edited July 12, 2020 by hosyn Quote
marko_ribar Posted July 12, 2020 Posted July 12, 2020 Can you describe what do you want to achieve... command functions can't have spaces so (getstring T) is wrong - it should be just (getstring)... But you want to make lsp file that has inside listed strings you input as command functions - "(defun c:" and ".lsp" is wrong then - it should be "(c:" and ")"... And if you want to invoke routine for several inputs, then (open filename "w") should actually be (open filename "a") - "a"-appending... Quote
BIGAL Posted July 13, 2020 Posted July 13, 2020 Your request does not make much sense why not set up menu etc to pick lisp to run. You could use the multi radio buttons.lsp to have a list of lisp programs to run like Marko can load and run. 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.