Jump to content

Compile without VLISP


SCaldeira

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 6 years later...

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...