Author Topic: Is there any way to onekey compile a lsp to fas  (Read 3778 times)

0 Members and 1 Guest are viewing this topic.

haibinpro

  • Newt
  • Posts: 52
Is there any way to onekey compile a lsp to fas
« on: November 01, 2013, 01:12:23 AM »
after start vlide,
you can use

(vlisp-compile 'st "k:\\jttemp.lsp")
(vlisp-compile 'st "jttemp.lsp" "GoodKarma.fas")

to compile lsp files.

but if you compile it before vlide start,get error

error:no function definition: VLISP-COMPILE

any sollution?

I have try
(command "netload" "VLLIB.DLL")
but it not work.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Is there any way to onekey compile a lsp to fas
« Reply #1 on: November 01, 2013, 03:11:32 AM »
Try this.

Code - Auto/Visual Lisp: [Select]
  1. (defun c:doit ()
  2.         (c:vlide)
  3.         (vlisp-compile 'st "jttemp.lsp" "K:\\TestBed\\GoodKarma.fas")
  4.         (princ)
  5. )
  6.  



Please keep this to yourself, very few people know this secret  ...  :-)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Slim©

  • Needs a day job
  • Posts: 6566
  • The Dude Abides...
Re: Is there any way to onekey compile a lsp to fas
« Reply #2 on: November 01, 2013, 09:43:30 AM »
Very NICE! Thanks!
I drink beer and I know things....

haibinpro

  • Newt
  • Posts: 52
Re: Is there any way to onekey compile a lsp to fas
« Reply #3 on: November 02, 2013, 01:01:17 AM »
Try this.

Code - Auto/Visual Lisp: [Select]
  1. (defun c:doit ()
  2.         (c:vlide)
  3.         (vlisp-compile 'st "jttemp.lsp" "K:\\TestBed\\GoodKarma.fas")
  4.         (princ)
  5. )
  6.  
Thanks,
It's my fault to forget to say the reson why i need load the dll.
currently,I make a tools to onekey compile the current lsp to fas.
So it is nice if it can be done by command line ,without vlide's gui start.
it make people experence better.

So, is it any way compile the lsp to fas and no need to start vlide obviously.


below is a code i fount at somewhere
Code: [Select]
(defun c:lsptofas ( / f fname ml n str)
  ;infact,script (command "vlisp") didn't work
  (command "vlisp")
  (vl-load-com)
 
  (setq fname (getfiled "lisp数据文件" ".lsp" "lsp" 16))
  (if (not fname)
    (exit)
  )
  (if (not (setq f (vl-filename-directory fname)))
    (exit)
  )
  (setq ml (vl-directory-files f "*.lsp" 1))
  (setq n (length ml))
  (princ "\n 转换中...请稍等! \n")
  (repeat n
    (setq str (car ml)
    str (strcat f "\\" str)
    )
    (vlisp-compile 'st str)
    ;(vl-file-delete  str)
    (setq ml (cdr ml))
  )
  (princ (strcat "转换数:" (itoa n)))
  (princ)
)
« Last Edit: November 02, 2013, 01:10:41 AM by haibinpro »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Is there any way to onekey compile a lsp to fas
« Reply #4 on: November 02, 2013, 04:00:31 AM »
Great that it works for you.

haibinpro,

Which code editor are you using ?
Is that working inside AutoCAD?
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

haibinpro

  • Newt
  • Posts: 52
Re: Is there any way to onekey compile a lsp to fas
« Reply #5 on: November 02, 2013, 09:42:39 AM »
Great that it works for you.

haibinpro,

Which code editor are you using ?
Is that working inside AutoCAD?
currently I use everedit for text edit,also use it for edit some code.
I make a sugguest post here
http://www.theswamp.org/index.php?topic=44949.0
I make a autolisp mode for EverEdit,witch use some vbs script to enhance the code edit and intract with autocad
such as
Load the select as lsp file.mac
display userdefine helps for the keyword.mac
Pickup Vars.mac
Pickup Functions.mac
Pickup Commands.mac
jump to vars
view dcl
also some resouce for it,such as calltips syntax snippet etc
all these is easy to combile to your favor editor
I'm try my best to make ultra tools to make the code work more convinient.
I update the mode at offical forum site:
http://forum.everedit.net/viewtopic.php?f=3&t=433
after the work done,
i'll update the sugguest post and upload all the resource and script for you.

I didn't know what this sentence mean.
Is that working inside AutoCAD?
if you mean does it can take the multitext edit tools,all the text edit can do the work.
if you mean does it have special support for autocad,I'm doing the works now.

best regards
« Last Edit: November 02, 2013, 09:49:14 AM by haibinpro »