SCaldeira Posted May 27, 2013 Posted May 27, 2013 I found this code that compiles the files directly, without those annoying errors from VLISP. (defun c:FAS (/ name lispname outfilename findfas rewritefas) (setvar "cmdecho" 0) (setq name (strcase (getstring "Enter Lisp Name: "))) (setq lispname (strcat "C:\\LISP_Directory\\" name ".LSP" ) ;_end strcat ) ;_end setq (setq outfilename (strcat "C:\\FAS_Directory\\" name ".FAS" ) ;_end strcat ) ;_end setq (setq findfas (findfile outfilename)) (if (not findfas) (vlisp-compile 'st lispname outfilename) (progn (initget "Y N") (setq rewritefas (getkword "Save Over Existing FAS? [Yes or No]: ") ) ;_end setq (if (= rewritefas "Y") (vlisp-compile 'st lispname outfilename) (alert "FAS Compiling Aborted") ) ;_end if ) ;_end progn ) ;_end if (setvar "cmdecho" 1) (princ) ) ;_end defun Best regards. Quote
MSasu Posted May 27, 2013 Posted May 27, 2013 I would guess that the VLISP-COMPILE function use the same interpreter as VLISP IDE. Also, not sure what kind of errors are you talking about? Quote
Lee Mac Posted May 27, 2013 Posted May 27, 2013 There are many vlisp-* functions available, however as far as I am aware, all (except vlisp-compile) are undocumented: vlisp-compile vlisp-compile-list vlisp-dclres-list vlisp-dclres-load-dialog vlisp-drop-project vlisp-export-symbol vlisp-fasres-list vlisp-fasres-load vlisp-find-project vlisp-import-exsubrs vlisp-import-symbol vlisp-inires-list vlisp-list-loaded-projects vlisp-load-project vlisp-make-file-fas vlisp-make-project-fas vlisp-make-project-load-file vlisp-project-fas-list vlisp-read-file-xdv-list vlisp-read-project-xdv-list For most, the VLIDE must be open for the function to be used. Quote
SCaldeira Posted May 27, 2013 Author Posted May 27, 2013 Responding to Mircea, sometimes I tried to compile a file and vlisp returned a error “error: bad argument value: non-negative: -1 ”, however the lisp without compilation runs perfectly in autocad, and thats the reason for my curiosity. Regards. Quote
MSasu Posted May 27, 2013 Posted May 27, 2013 Did you tried to debug the code that generate that error at compile? I may be wrong, but really believe that the aforementioned function isn't doing a better job, it just doesn't display the warning. Quote
Lee Mac Posted May 27, 2013 Posted May 27, 2013 sometimes I tried to compile a file and vlisp returned a error: "error: bad argument value: non-negative: -1" Are you able to post the code that causes this compilation error so that we might investigate the issue? Quote
M. Govind Posted January 29, 2020 Posted January 29, 2020 I couldn't find a solution to this problem anywhere in this forum. However what I found was if you made a PRV file manually and submitted it to the "Rebuilt Application" option of the Visual Lisp IDE, the files would be compiled fine and a VLX file generated without errors. The error in question occurs only when an attempt is made to compile the files afresh. 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.