Jump to content

Recommended Posts

Posted

Hello, this is my first time trying to compile a LSP file.

I run the following command: (vlisp-compile 'st "bbb_60.lsp") and the output seems correct but there is no output FAS file in this folder nor in any other folder of my PC.

What am I doing wrong?

 

 

; (COMPILAZIONE FILE st (C:/Program Files/Autodesk/AutoCAD 2024/bbb_60.lsp))
[Analisi file "C:/Program Files/Autodesk/AutoCAD 2024/bbb_60.lsp"]
......
[COMPILAZIONE C:/Program Files/Autodesk/AutoCAD 2024/bbb_60.lsp]
;;EXPLODEINSERT 
;;KEEPHATCH 
;;OBJ2BLK1 
;;RIFILO 
;;ERASELINE 
;;C:BBB 
[FASDUMPING formato oggetto -> "C:/Program Files/Autodesk/AutoCAD 2024/bbb_60.fas"]
; Compilazione completata.

 

Posted

The using the MAKELISPAPP command and use the wizard to setup the target folders..

Posted

Here is some sample code. NOTE VLIDE must be open.

; must have vlide open to work

; 15 is  "D:\\alan\\cadac\\"
; 4 is .lsp

(defun comp ( )
(if (null vlisp-compile) (c:vlide T)) 
(setq fname (getfiled "Pick lisp to be compiled" "D:\\alan\\lisp" "lsp" 8))
(setq len (strlen fname))
(setq diff (- len (+ 15 3)))
(setq fnameout (substr fname 15 diff))
(vlisp-compile 'st  fname  (strcat "d:\\alan\\compiled\\" fnameout ".fas"))
)
(comp)

; must have vlide open to work
(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "Vlide")
(setq loads (list 
""xxx3d pts on face 4"
"xxxblock atts invisible"
"xxxChange client logos-3"
"xxxClose plines"
"xxxCogo Label_C"
)
)
(setq loc1 "C:\\XXX-CAD-TOOLS\\") ;;change dirs to where ever you want them found
(setq loc2 "D:\\XXX\\compile\\") ;;change dirs to where ever you want them saved
(foreach lisp loads
(vlisp-compile 'st (strcat loc1 lisp ".lsp") (strcat loc2 lisp ".fas"))
)





(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "Vlide ")

(setq loads (list "ca4usrla"))
(setq loc1 "D:\\Alan\\Cadac\\")
(setq loc2 "D:\\Alan\\compiled")
(foreach lisp loads
(vlisp-compile 'st (strcat loc1 lisp ".lsp") (strcat loc2 lisp ".fas"))
)

(vlisp-compile 'st "d:\\alan\\cadac\\ca5cav2.lsp"" "d:\\alan\\compiled\\ca5cav2.fas")


(if (null vlisp-compile) (c:vlide T))
(setq fname (open "d:\\4vft\\unlocked\\lsp.txt" "R"))
(setq x 1)
(while (setq filename(read-line fname))
(vlisp-compile 'st (strcat "d:\\4vft\\unlocked\\" filename ".lsp") (strcat "d:\\alan\\compiled\\" filename ".fas"))
(princ (setq x (1+ x)))
)
(close fname)



(if (= (setq alancnt (getenv "alanh")) nil)
(progn 
(setenv "alanh" "1")
(alert "Your trial has started\n \n You have 30 times that you can use the software\n \n Contact Email  info@alanh.com.au\n \n for further information.")
)
(progn
(setq alancount (+ (atoi alancnt) 1))
(setenv "alanh" (rtos alancount 2 0))
(alert (strcat "You have " (rtos (- alancount 1) 2 0) " repeat to go"))
)
)

(if (>= alancount 30)
(progn
(alert "Your trial number has finished \n \n You need to contact\n \n Alanh Consulting \n \n Email  info@alanh.com.au")
(exit)
)
)


(vlisp-compile-list 'st (list "D:\\alan\\lisp\\box.lsp"" "d:\\alan\\lisp\\brdi.lsp"") "d:\\acadtemp\\fas-file-name")

 

 

Posted

I've discovered that the problem is that AutoCAD in my PC has no permission to write in the folder "C:/Program Files/Autodesk/AutoCAD 2024/".

I've just moved the lisp source file to another folder and it compiles flawlessy.

 

  • 1 month later...
Posted

I have this code for LISP to FAS

 

;;  LSP2FAS.lsp                                    ; Scot Harris  11-29-2012
;;   Minimizes the sequence needed to create FAS files.
;;   Help facility added.
;;   Streamlined from original program provided by aqdam1978.

(defun c:LSP2FAS-Help (/)
 (alert (strcat
  "\tLisp (LSP) to Fast and Secure (FAS) Help"
  "\n "
  "\nFile dialog begins in the current directory.   "
  "\nIt is suggested to place and open a drawing (DWG)   "
  "\ninside the input folder you wish to batch process.   "
  "\n "
  "\nOutput file will be in the same folder as the file selected.   "
  "\n "
  "\nThere is no provisional check for an existing FAS file of the same name.   "
 ))
);end LSP2FAS-Help

(defun c:LSP2FAS ( / a )
 (vl-load-com)
 (prompt " Lisp to Fast and Secure (FAS). LSP2FAS-Help available. ")
 (if (wcmatch (strcase (setq a (getfiled "Convert LSP File to FAS" (getvar "DWGPREFIX") "" 16))) "*.LSP")
  (progn
   (c:vlide)(vlisp-compile 'st a)
   (princ (strcat "\n File " (vl-string-subst ".fas" ".lsp" a) " created. "))
  );progn
  (alert "File extension must be \".LSP\"   ")
 );if
 (princ)
);end LSP2FAS

 

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...