TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: hudster on July 26, 2006, 06:21:51 AM
-
Does anyone know of an auto lisp loader?
I'm looking for something I can add lisps to, but give them a description, which also would allow me to categorise them and would work inside autocad.
Something so I don't have scroll through loads of lisps looking for the one I want but can't remember what it's called.
Cheers for any help.
-
That sounds like a candidate for a csv file, or similar ..
Full_command_Name, alias_shortcut, load_path, catagory, description_string
.. etc adinfinitum ...
-
couple of hints ..
LispLoaderDataBase.csv
command,alias,category,loadpath,description
c:test,c:ttt,fun,c:/lisp/,Test routine to prove the theory.
c:routine2,c:r2,fun,c:/lisp/,Test 2 routine to prove the theory.
c:routine3,c:r3,fun,c:/lisp/,Test 3 routine to prove the theory.
Some code
(SETQ filequalifiedname (FINDFILE "LispLoaderDataBase.csv")
listofsublists (CDR (MAPCAR
'(LAMBDA (textrow) (kdub:strparse textrow ","))
(kdub:textfile-to-list filequalifiedname)
)
)
command_list (MAPCAR '(LAMBDA (sublist) (CAR sublist)) listofsublists)
)
The result
listofsublists
(("c:test" "c:ttt"
"fun"
"c:/lisp/"
"Test routine to prove the theory."
)
("c:routine2" "c:r2"
"fun"
"c:/lisp/"
"Test 2 routine to prove the theory."
)
("c:routine3" "c:r3"
"fun"
"c:/lisp/"
"Test 3 routine to prove the theory."
)
)
command_list
("c:test" "c:routine2" "c:routine3")
Just need a dialog, and some car , cudda and nth code :-)
-
Andy
Is this what you are looking for? This is how I load lisp from a dialog box which displays a discription?
Reads a text file with command name and discription.
||||||||||||||||||||||||||||||| ANNO Commands |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,
ANNO,Annotation Commands...
||||||||||||||||||||||||||||||| COUNT Commands |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,
TNT,Count Number on Isolated Layer
TXCALC,Calc Selected Text
TXCNT,Text Count on Isolated Layer
||||||||||||||||||||||||||||||| DTEXT Commands |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,
ARCTEXT,Arc Text
BLKLBL,Block Label
CEL,Contour Elevation Line
CVTX,Dtext along Curve
DTL,Dtext w/ Leader
DTX,Dtext w/Style and Layer
ISOTX,Isometric Dtext
LNOTE,Label Dtext w/ Character
MCL,Centerline Dtext Label
MLA,Multi Arrow Leader
MLC,Multi Circle Leader
NN,General Notes
NOTES,Multi Line Dtext w/ Leader
ROMANS,Integer to Roman Numeral
STX,Sufix Prefix for Dtext
TCL,Centerline Dtext Label
TED,Multiline Dtext Edit
TXA,Dtext Inserted in Line
TXC,Dtext Continue to Next Line
TXF,Dtext Added to Front
TXK,Dtext Cont to Next Line w/ Scale
TXR,Add to Dtext Rear
TXT,Dtext Continue to Next Line
TWAVE,Dtext Wave...
TXG,Dtext Graphics
||||||||||||||||||||||||||||||| EXPORT IMPORT Commands |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,
IT,Import Export Dtext...
MNOTE,Import Dtext to Mtext
TXOUT,Dtext Out to Notepad
(defun ARCH:WRITE-COMMANDS (/ write-cmm cmm)
(if (/= pickcmm nil)
(progn (setq cmm (nth pickcmm cmm_lst)) (setq ARCH#_CMM (nth 0 cmm))))
(setq ARCH#CMM_ ARCH#DIAL)
(if (wcmatch ARCH#_CMM "|*,=*")
(setq ARCH#_CMM ARCH#CMM_))
)
(action_tile
"commands-list"
"(setq pickcmm (atoi $value))(ARCH:WRITE-COMMANDS)(ARCH:DO_ACT-DONE $key)"
)
((= op "commands-list")(eval (read (princ (strcat "(C:" ARCH#_CMM ")")))))
Gary
-
yeah that would do it.
I was looking for something with tabs though, which I could configure into different areas.
-
One list box opening up different files to read?
Gary