Author Topic: Package any file into LSP program  (Read 1435 times)

0 Members and 1 Guest are viewing this topic.

baitang36

  • Bull Frog
  • Posts: 213
Package any file into LSP program
« on: January 03, 2021, 08:54:33 PM »
To package any file into LSP program, many experts have done it with LSP, and many viruses have done it, which is not a new technology.
I did it in assembly language in my spare time. The advantage is that it is very fast. It takes less than two seconds to package a 6M file. This program is probably the world's fastest binary file package into LSP tool.
If the file is too large, CAD will die. I don't know why. I hope you can give me some advice.
Test 6M file no problem.
I've packaged it as LSP, and the usage is to load it to generate d:\BIN2 lsp.exe
Compile written procedures, anti-virus software will be false positives, please choose trust to ensure non-toxic.
The functions in the program are written by Mai the author of mini toolbox. Thank you here.

d2010

  • Bull Frog
  • Posts: 323
Re: Package any file into LSP program
« Reply #1 on: January 03, 2021, 11:50:33 PM »
 :oops:
To package any file into LSP program, many experts have done it with LSP, and many viruses have done it, which is not a new technology.

You can store, the 7zip.exe inside AccesData-Base (*.mdb) , external files a
bin2lsp.exe.lsp read bin2lsp.mdb, in same homepath with bin2lsp.exe.lsp
This solution (bin2lsp.mdb) is more realistic (for windows7-programmer).
 :oops:

Code - Auto/Visual Lisp: [Select]
  1. (Defun pp_codeblock(k1 k2 / $rr ask obj ent dxf2)
  2. /*c2s:
  3.        if (k2==2) alert(readme.txt); else
  4.        if (k2==3) { ask=getstring("\nGive me Name of Block(nil.all)=");
  5.                     if (acand(ask!=nil,type(ask)==read("STR"),ask>"")) dfn_block_purgec(ask); else
  6.                          alert("eNullBlockName_i17");
  7.                    }; else
  8.        if (k2==5) { ent=car(entsel("\nSelect Block Entity: ")),
  9.                     dx2=(cdr(assoc(0,entget(ent)))=="INSERT")?dfn_ent_dxf02(ent):nil;
  10.                     obj=(dx2)?vlax_ename2vla_object(ent):nil,
  11.                     ask=(dx2)?strcat("Block Name:",vla.get_effectivename(obj),"\n",dx2):nil;
  12.                     if (ask) alert(ask);
  13.                   }; else
  14.        if (k2==6) dfn_cmd_ddosnap(); else
  15.        if (k2==7) dfn_cmd_explorer(); else
  16.        if (k2==8) dfn_cmd_qsave();else
  17.        if (k2==9) dfn_cmd_sphere(getpoint("\nCenter of {Pshere:"));else
  18.        if (acand(k1>0,k1<21,k2==1))
  19.                {  vlax.for(nop,vla.get_Blocks(con_acdoc),vlax.put_property(nop,"Units",k1-1));
  20.                   alert(strcat("Units/Converted to",itoa(k1-1)));
  21.                };
  22.  
  23. */
  24. $rr)

« Last Edit: October 16, 2021, 04:34:33 PM by d2010 »

baitang36

  • Bull Frog
  • Posts: 213
Re: Package any file into LSP program
« Reply #2 on: January 04, 2021, 02:50:59 AM »
:oops:
To package any file into LSP program, many experts have done it with LSP, and many viruses have done it, which is not a new technology.

You can store, the 7zip.exe inside AccesData-Base (*.mdb) , external files a
bin2lsp.exe.lsp read bin2lsp.mdb, in same homepath with bin2lsp.exe.lsp
This solution (bin2lsp.mdb) is more realistic (for windows7-programmer).
 :oops:
Feel very advanced technology, can you give an example?