vlisp-compile and lispsys problem

vlisp-compile and lispsys problem

SAPER59
Advocate Advocate
394 Views
3 Replies
Message 1 of 4

vlisp-compile and lispsys problem

SAPER59
Advocate
Advocate

I use (vlisp-compile 'st fbaselsp) inside some functions, to create FAS files in order to let the user exchange some parameters without letting them change manually.

The point is that is this FAS was created in a PC with lispsys set to 1,  could not be loaded in a pc that has lispsys set to 0,  the error showed is : bad fast-load format in file xx.FAS

but if it was created with lispsys set to 0 can be loaded without problem for both values 0 or 1 set in the loaded PC.

Is there any way to know how was it created or how to solve this

 

Thanks

0 Likes
Accepted solutions (1)
395 Views
3 Replies
Replies (3)
Message 2 of 4

Simon_Weel
Advisor
Advisor
Accepted solution

Did some testing. I notice I have LISPSYS set to 0 (zero) by default. All LISP files are compiled in this mode. If I open a .fas file in Notepad, the first line says FAS4-FILE.

Then I set LISPSYS to 1, installed the Visual Studio Stuff that's needed when entering VLIDE - later found out I don't need that after all - compiled a LPS file, opened it in Notepad and the first line reads FAS5-FILE.

So I guess you have to search the FAS files for one of those texts to figure out in what mode it was compiled.

BTW - setting LISPSYS to 2 reverts back to FAS4-FILE.

0 Likes
Message 3 of 4

SAPER59
Advocate
Advocate

Thanks Simon,

This could be a solution to know how was done, but I still need to know how to load it, been a normal FAS when lispsys is 0.

Otherwise I need to order all to set lispsys to 1. 

Seems a bug in AutoCAD.

Anyway I will accet you answer as solution

Thanks again

0 Likes
Message 4 of 4

Simon_Weel
Advisor
Advisor

There are different solutions, I think. IMO the easiest way is to make sure all AutoCAD's run the same LISP-mode. You could have acad.lsp (uncompiled) to check lispsys and if necessary change it's value and restart AutoCAD.

Another approach could be to have two versions of every LISP routine - one for the 'old style' FAS files and one for the 'new style' FAS files. Give them a) different names or b) put them in different folders. And then again use acad.lsp to check lispsys and for option b) set the support path to one of the folders. For option a), use acaddoc.lsp to check lispsys and have the autoload function to load the appropriate file.

0 Likes