Author Topic: Lisp loader?  (Read 2114 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Lisp loader?
« 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.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Lisp loader?
« Reply #1 on: July 26, 2006, 06:27:40 AM »
That sounds like a candidate for a csv file, or similar ..

Full_command_Name, alias_shortcut, load_path, catagory, description_string
.. etc adinfinitum ...

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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Lisp loader?
« Reply #2 on: July 26, 2006, 08:15:37 AM »
couple of hints ..

LispLoaderDataBase.csv
Code: [Select]
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
Code: [Select]
(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
Quote
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 :-)
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.

GDF

  • Water Moccasin
  • Posts: 2081
Re: Lisp loader?
« Reply #3 on: July 26, 2006, 11:16:59 AM »
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.


Code: [Select]
||||||||||||||||||||||||||||||| 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


Code: [Select]
(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

Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

hudster

  • Gator
  • Posts: 2848
Re: Lisp loader?
« Reply #4 on: July 26, 2006, 11:49:40 AM »
yeah that would do it.

I was looking for something with tabs though, which I could configure into different areas.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

GDF

  • Water Moccasin
  • Posts: 2081
Re: Lisp loader?
« Reply #5 on: July 26, 2006, 11:57:23 AM »
One list box opening up different files to read?

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64