Jump to content

Custom External Macro Program (Like CADTools)?


zyborgmonkey

Recommended Posts

I have quite a collection of Lisps I've been playing around with and editing, building my own etc.

I just wondered as I've used the CADTools program  which works as a standalone panel of additional commands.

Is there something out there or tutorials on how to build your own?

Or perhaps there's a base template program which allows you to assign functions to each button which you can move between systems as an alternative to an autoloader or physical macro pad setup & autokey etc?  

Link to comment
Share on other sites

Not familiar with CADTools but have been customizing AutoCAD's interface for over 30 years. Why not just build a custom CUI referencing your lisp functions? I'd recommend loading them as needed with autoload or in the macro when the function is called. Plenty of us could help you with that.

  • Like 1
Link to comment
Share on other sites

As a start with lots of LISPS, Lee Macs getsyntax will search through the LISP files and return the LISP names in each (if the follow the syntax "(defun c:LISPNAME ...."

 

Options are Tombu and making up a CUI, BigAl might have something up his sleeve with DCL, I have a DCL that returns a list of al the LISPs in a folder (needs a lot to change it about to be an index though). DCL and LISP has a benefit perhaps that the list of LISPs can be made 'on the fly' (and Lee Macs Get Syntax can be modified to do that)

  • Agree 1
Link to comment
Share on other sites

Cheers guys,

Yeah spent the last few days procrastinating a bit in alternatively customising the gui XD 

 

Not an easy task using the cui lol lots of scrolling and tweaking :p

 

I think I attempted it before but lost the file 🤦‍♂️

 

This is the cad tools application I was referring to:

https://www.glamsen.se/CadTools.htm

 

Be nice to have a quick fire method such as that where you can paste in the lisp code to each button and be able to take it between systems on a usb to save the setup on each. 

 

I'll run through what you suggested and keep going with the custom panels in the meantime and see how it goes :)

Link to comment
Share on other sites

Forgot I had this as an example, LISP and DCL version, I'll clean it up later and post it:

 

A LISP version - but creates the lists dynamically. I have my LISPs save with suitable file names, several LISPs in a file (for example Zooms.lsp, contains ZA, ZE, ZP (wotk it out..)). Select file from the first drop down list, select the LISP from the 2nd, hit OK to run. Nothing else needed if this would work for you. Am sure I something a little more graphical.

 

Dynamic so that if you add to a file or add more files to the location it should pick them up. Might be a little slower than CUI (but then all the ones I use al the time I just go fromcommand line)

 

image.png.c007a3832ce2ca9181148b7389355b65.png

Edited by Steven P
Link to comment
Share on other sites

Try this, does what I posted above:

 

(my preference, but I can take this LISP with me anywhere, change companies, computer dies, change installation and you need to set up all the CUI again)

 

Command RunLisp

 

;;;;c:RunLisp;;;;;


;;Sub Routines:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;                                              ;;;;
;;;; UPDATE THIS LISP TO YOUR LISP SAVED LOCATION ;;;;
;;;;                                              ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun GetMyLispFolder( / MILFO)

  (setq MILFO "C:\\Users\\AutoCAD LISPS\\")

;;Edit for laptop:
;;These lines here, in case of using 2 computers with 2 different paths to your 'users' profile and files
;;  (if (= (findfile "C:\\Users\\AutoCAD LISPS\\RUNLISP.lsp") nil) ;;change file name to something in your files
;;    (setq MILFO "C:\\Users\\AutoCAD LISPS\\")
;;  )

;;  (setq MILFO "c:\\") ;; default C drive
  MILFO
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Browse for Folder  -  Lee Mac
;; Displays a dialog prompting the user to select a folder.
;; msg - [str] message to display at top of dialog
;; dir - [str] [optional] root directory (or nil)
;; bit - [int] bit-coded flag specifying dialog display settings
;; Returns: [str] Selected folder filepath, else nil.

(defun LM:browseforfolder ( msg dir bit / err fld pth shl slf )
    (setq err
        (vl-catch-all-apply
            (function
                (lambda ( / app hwd )
                    (if (setq app (vlax-get-acad-object)
                              shl (vla-getinterfaceobject app "shell.application")
                              hwd (vl-catch-all-apply 'vla-get-hwnd (list app))
                              fld (vlax-invoke-method shl 'browseforfolder (if (vl-catch-all-error-p hwd) 0 hwd) msg bit dir)
                        )
                        (setq slf (vlax-get-property fld 'self)
                              pth (vlax-get-property slf 'path)
                              pth (vl-string-right-trim "\\" (vl-string-translate "/" "\\" pth))
                        )
                    )
                )
            )
        )
    )
    (if slf (vlax-release-object slf))
    (if fld (vlax-release-object fld))
    (if shl (vlax-release-object shl))
    (if (vl-catch-all-error-p err)
        (prompt (vl-catch-all-error-message err))
        pth
    )
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun GetRunLisp(/ RL)
  (setq RL "No")
  RL  
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun GetMyLispFiles ( / MILF MILFI)
  (setq MILFI (vl-directory-files (GetMyLispFolder) "*.lsp" nil))
  MILFI
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun GetLastListSelection( / LLS)
  (setq LLS "LH")
  LLS
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;When a different *.lsp file is selected, changes the lisps;;
;;drop down list contents
(defun SP:updatelisps( spLispFolder splispfiles / lispsreturn mylispfiles myfile mylisps lisps )
;;(defun SP:updatelisps( spLispFolder splispfiles / )

  (setq y nil)
  (setq y (read (get_tile "lispfiles")))
  (setq mylispfiles (vl-directory-files mylispfolder "*.lsp" nil))

  (setq myfile (strcat mylispfolder (nth y mylispfiles)))
  (setq mylisps (LM:getsyntax myfile))
  (setq mylisps (vl-remove "\"" mylisps)) ;;to remove defined items from the list. Example, it picks up 'defun c:"' in programming as lisp '"'

  (setq mylisps (vl-sort mylisps '<)) ;;sorts the list
  (start_list "lisps" 3)(mapcar 'add_list mylisps)(end_list) ;;create Lisps list
;;  lisps

  (setq lispsreturn (list lisps mylispfiles myfile mylisps))

  lispsreturn
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun SP:selectfolder( / SFMyDir SFLispFiles)
  (setq SFMyDir (LM:browseforfolder "Select a folder" "SFMyDir" 0))
  (if (/= SFMyDir Nil) ;;if folder selection wasn't cancelled
    (progn
      (set_tile "foldertext" SFMyDir)
      (setq SFMyDir (strcat SFMyDir "\\"))
      (setq SFLispFiles (vl-directory-files SFMyDir "*.lsp" nil)) ;;runlispfiles is the list of files in runlispdir location

      (setq lispfiles nil)
      (start_list "lispfiles" 3)(mapcar 'add_list SFLispFiles)(end_list) ;;create Lisp files list
      (setq z (read (get_tile "lispfiles")))

      (setq myfile (strcat SFMyDir (nth z SFLispFiles)))
      (setq mylisps (LM:getsyntax myfile))
      (SP:lisplist SFMyDir)

      (start_list "AllLisps" 3)(mapcar 'add_list allthelisps)(end_list);;create Lisp files list
      (setq mylispfolder SFMyDir)
      (setq runlispfiles SFLispFiles)
    );;end progn
  );; end if
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;creates a text box pop up listing all the lisp routines in;;
;;*.lsp files in the location below                         ;;
(defun SP:lisplist ( lisplistfolder / SortedLisps SortedFiles SortedListLength SortedCount)

  (setq allthelisps nil)
  (setq mylispfileslist nil)
  (setq mylispfileslist "")

  (setq mylispfiles (vl-directory-files lisplistfolder "*.lsp" nil)) ;;mylispfiles is list of files in mylispfolder location
  (setq mylistlength (length mylispfiles)) ;;count of number of lsp files
  (setq acount -1)

  (setq myroutines "")

  (repeat mylistlength
    (setq acount (1+ acount))
    (setq myfilename (strcat lisplistfolder (nth acount mylispfiles)))

    (progn
      (if (not (mapcar '(lambda ( x ) (princ)) (setq mylisplist (LM:GetSyntax myfilename)))) ;;puts list into an array
        (princ "\n -None-\n")
      )

      (setq mylisplist (vl-remove "\"" mylisplist)) ;;to remove defined items from the array.
      (foreach n mylisplist                         ;;loops through array
        (progn
          (setq allthelisps (cons n allthelisps))         ;;All the lisps is a list of all the lisps
          (setq mylispfileslist (cons myfilename mylispfileslist)) ;;generates a list of files coresponding to the LISPS
        ) ; end progn
      ) ; end foreach
    )
  )

  (setq SortedLisps (vl-sort allthelisps '<)) ;;sorts the list
  (setq SortedListLength (vl-list-length SortedLisps))
  (setq SortedCount 0)

  (while (<= (+ SortedCount 1) (vl-list-length SortedLisps))
    (setq LLFilePath (nth (vl-position (nth SortedCount SortedLisps) allthelisps) mylispfileslist)) ;;make into a list
    (setq SortedFiles (cons LLFilePath SortedFiles)) ;;generates a list of files coresponding to the LISPS
    (setq SortedCount (+ SortedCount 1))
  )

  (setq allthelisps SortedLisps)
  (setq mylispfileslist (reverse SortedFiles))
  (setq lisplist (list allthelisps mylispfileslist))
  lisplist
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;When a lisp routine is selected or OK pressed
(defun RL:runlisp ()

;;Add in here check if anything was selected

  (setq runlisp "Yes")
  (setq popupvalue (read (get_tile "lisps")))
  (setq alisp (strcat "c:" (nth popupvalue mylisps)))
(princ)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Creates a pop up box listing the *.lsp files and the lips ;;
;;routines within that file                                 ;;
;;Selecting a lisp routine name will run that lisp routine  ;;
(defun c:RunLisp ( / dcl des dch)

;;Initial values
  (setq runlisp (GetrunLisp))
  (setq mylispfolder (GetMyLispFolder))
  (setq mylispfiles (GetMyLispFiles)) ;;list of files in mylispfolder location.
  (setq lastlistselection (GetLastListSelection))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;create DCL pop up box                                      ::

  (if
    (and
      (setq dcl (strcat (getvar "TEMPPREFIX") "RunLisps.dcl")) ;; make tenporary DCL file in temp folder
      (setq des (open dcl "w"))
      (foreach x
        '(
"           pass : dialog"
"           {"
"             key = \"Lispdialoguebox\";"
"             label = \"RUN LISP\";"
"             spacer;"

"             : boxed_column { label = \"Select LISP Routine\";"
"               : row { width = 60; alignment = centered;"
"                 : column {width = 20; alignment = centered;"
"                   :row {alignment = bottom;"
"                     : text { key = \"filetext\"; label = \"File Name\"; width = 20; alignment = right;}"
"                   }"
"                 }"
"                 : column {width = 40; alignment = left;"
"                   : popup_list { key = \"lispfiles\"; width = 40; multiple_select = true ; alignment = left; }"
"                 }"
"               }"

"               : row { width = 60; alignment = centered;"
"                 : column {width = 20; alignment = centered;"
"                   :row {alignment = bottom;"
"                     : text { key = \"Lisptext\"; label = \"Lisp Name\"; width = 20; alignment = right;}"
"                   }"
"                 }"
"                 : column {width = 40; alignment = left;"
"                   : popup_list { key = \"lisps\"; width = 40; multiple_select = true ; alignment = left; allow_accept = true;}"
"                 }"
"               }"
"               : row {"
"                 : button { key = \"folder\"; label = \"Change Lisp Library\"; is_default = false; fixed_width = true; width = 5;}"
"                 : text { key = \"foldertext\"; label = \"Folder Location\"; width = 40; }"
"                 spacer;"
"               }"
"             }"
"             : boxed_column { width = 60; alignment = left;"
"               : row {"
"                 : column {width = 18; alignment = centered;"
"                   : button { key = \"accept\"; label = \"OK\"; is_default = true; is_cancel = true; fixed_width = true; width = 15; }"
"                 }"
"                 : column {width = 18; alignment = centered;"
"                   : button { key = \"cancel\"; label = \"Cancel\"; is_default = false; is_cancel = true; fixed_width = true; width = 15; }"
"                 }"
"               }"
"             }"
"           }"
          )
        (write-line x des)
      )
      (not (setq des (close des)))
      (< 0 (setq dch (load_dialog dcl)))
      (new_dialog "pass" dch)
    )
    (progn
;;End of DCL pop up box                                      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;makes a pop-up list box
      (start_list "lispfiles" 3)(mapcar 'add_list mylispfiles)(end_list);;create Lisp files list
      (set_tile "foldertext" mylispfolder)
      (action_tile "lispfiles" "(setq lisps (SP:updatelisps mylispfolder (read (get_tile \"lispfiles\"))))")
      (action_tile "lispfiles" "(setq nthlisps (SP:updatelisps mylispfolder (read (get_tile \"lispfiles\"))))
                                (setq lisps (nth 0 nthlisps))
                                (setq mylispfiles (nth 1 nthlisps))
                                (setq myfile (nth 2 nthlisps))
                                (setq mylisps (nth 3 nthlisps))
                               "
      ) ; end action tile
      (action_tile "folder" "(SP:selectfolder)")

;; RLMyLispFolder RLLastListSelection 
      (setq lastlistselection "Alllisplist") ;;set this to whatever
      (action_tile "accept" "(RL:runlisp)(done_dialog 1)")
      (action_tile "cancel" "(done_dialog 0)")
      (start_dialog)
    ) ;;end of DCL 'and' above
    (princ "\nError. Unable to load dialogue box.")
  ) ;;end of DCL 'if' above
  (vl-file-delete dcl) ;;delete the temp DCL file

  (if (= runlisp "Yes")
    (progn
      (load myfile)
      (princ "\n")
      (princ alisp)
      (princ ": ")
      (eval (list (read alisp))) ;;run the lisp
    )
  )

(princ)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;RUNLISP Keyboard Command "RunLisp"
;;Gives the user a dialogue box to select and run a lisp
;;Lisps are listed by the file that they are saved in
;;

 

Edited by Steven P
Corrected code - missing sub routines
  • Like 1
Link to comment
Share on other sites

As suggested I use a custom mnu rather than using the CUI as the editor, you just make a menu using notepad. You can make custom toolbars the same way. Behind the menu is a Autoload or a load a lisp.

 

image.png.222f4102098370d2dd8f81336f47e165.png

Another

image.thumb.png.3f2be27d4304d73cb9f226813f8a042f.png

Edited by BIGAL
  • Like 2
Link to comment
Share on other sites

  • 1 month later...

Hello everyone, this is my first time posting on the forum.

I'm not well versed in lisp, but it seems to me that the RunLisp code, apart from the Lee Mac function (LM:browseforfolder), is missing the SP:lisplist function to make the program change folder function.

Where can I find this function?

Link to comment
Share on other sites

I've updated the code above to add these in.

 

Let me know if I missed any others!! (It is quite a lot I might have missed something when I went through it before)

Edited by Steven P
Link to comment
Share on other sites

 

;;original author : highflybir

(defun C:test( / id i ok)
  (setq id (load_dialog "star test.DCL"))	;load DCL
  (if (new_dialog "dcl_test" id)
    (progn
      (setq i 1)
      (repeat 6
        (init_image i)				;assign an action to the image_button
	;(action_image i)			
	(setq i (1+ I))	
      )
      (action_tile "C1" "(action_command 1)") 	;assign an action to the button 1
      (action_tile "C2" "(action_command 2)") 	;assign an action to the button 2
      (action_tile "C3" "(action_command 3)") 	;assign an action to the button 3
      (action_tile "C4" "(action_command 4)") 	;assign an action to the button 4
      (action_tile "C5" "(action_command 5)") 	;assign an action to the button 5
      (action_tile "C6" "(action_command 6)") 	;assign an action to the button 6

      ;;of course ,you can do it by (repeat)
      (setq ok (start_dialog))
    )
    (alert "Can't load the dialoag!")
  )
  (unload_dialog ID)
  (princ)
)

;;; initializate the image_button.
;;; and assign an action to an image_button
(defun init_image (key / k tile)
  (setq k (itoa key))
  (setq tile  (strcat "I" k))				;tile
  (start_image tile)
  (fill_image
    0
    0
    (dimx_tile tile)
    (dimy_tile tile)
    key
  )
  (end_image)						;fill tile with different color
  (set_tile tile (strcat "Fun" k))			;set the text of tile
  (action_tile tile (strcat "(action_command " k ")"))	;action
)

;;; assign an action to an command_button
(defun action_command (key)
  (cond
    ((= key 1)
     (alert "Please enter  your command1:")
     ;;add your code in here
    )
    ((= key 2)
     (alert "Please enter  your command2:")
     ;;add your code in here
    )
    ((= key 3)
     (alert "Please enter  your command3:")
     ;;add your code in here
    )
    ((= key 4)
     (alert "Please enter  your command4:")
     ;;add your code in here
    )
    ((= key 5)
     (alert "Please enter  your command5:")
     ;;add your code in here
    )
    ((= key 6)
     (alert "Please enter  your command6:")
     ;;add your code in here
    )
  )
)

 

 

//test.dcl
dcl_test : dialog
{
  label = "Test dialog";
  : boxed_column
  {
    :row	//the first row  for command buttons.
    {
      : button
      {
        key = "C1";
        label = "command1";
      }
      : button
      {
        key = "C2";
        label = "command2";
      }
      : button
      {
        key = "C3";
        label = "command3";
      }
    }
    :row	//the second row for command buttons.
    {
      : button
      {
        key = "C4";
        label = "command4";
      }
      : button
      {
        key = "C5";
        label = "command5";
      }
      : button
      {
        key = "C6";
        label = "command6";
      }
    }
    :row      	//the third row  for image buttons 
    {
      : image_button  
      {
        key = "I1";
        width = 6;
        height = 3;
        aspect_ratio = 1;
        fixed_width = true;
        fixed_height = true;
        alignment = centered;
        color = -2;
      }
      : image_button
      {
        key = "I2";
        width = 6;
        height = 3;
        aspect_ratio = 1;
        fixed_width = true;
        fixed_height = true;
        alignment = centered;
        color = -2;
      }

      : image_button
      {
        key = "I3";
        width = 6;
        height = 3;
        aspect_ratio = 1;
        fixed_width = true;
        fixed_height = true;
        alignment = centered;
        color = -2;
      }
      : image_button
      {
        key = "I4";
        width = 6;
        height = 3;
        aspect_ratio = 1;
        fixed_width = true;
        fixed_height = true;
        alignment = centered;
        color = -2;
      }
      : image_button
      {
        key = "I5";
        width = 6;
        height = 3;
        aspect_ratio = 1;
        fixed_width = true;
        fixed_height = true;
        alignment = centered;
        color = -2;
      }

      : image_button
      {
        key = "I6";
        width = 6;
        height = 3;
        aspect_ratio = 1;
        fixed_width = true;
        fixed_height = true;
        alignment = centered;
        color = -2;
      }
    }
  }
  spacer_1;
  ok_cancel_help;
  //errtile;
}  

 

star test.lsp star test.dcl

Link to comment
Share on other sites

No,

RunLisp.lsp only displays lisp from selected folder (MILFO), no relation to supportpath.

Starting location of the lisp folder:

(setq MILFO "C:\\Users\\AutoCAD LISPS\\")

 

 

Link to comment
Share on other sites

On 2/25/2023 at 2:34 AM, BIGAL said:

Wilda no need to change directories, just add to the support paths list then programs will be found automatically.

 

Config

Files

Support path.

 

 

BigAl - my LISP example above has a hard coded path to the LISP folders rather than the AutoCAD support paths. I could change it to look for both, a custom file path and the support paths.. but haven't done that (I have all my LISPs on the cloud desktop, will always be there regardless of hardware or software updates and changes, very little in the support paths which is why I did it that way.)

 

 

 

 

(these LISPs are a by product of a very long journey to make a block LISP with thumbnails like your example... a journey with many many side tracked routes, I am currently still side tracked somewhere else)

Edited by Steven P
Link to comment
Share on other sites

On 24.02.2023 at 12:42, Steven P said:

I've updated the code above to add these in.

Let me know if I missed any others!! (It is quite a lot I might have missed something when I went through it before)

Now after adding the missing Lee Mac function LM:getsyntax the program and changing the folder works fine

Edited by wilda
  • Like 1
Link to comment
Share on other sites

As I wrote above, the program works great, thanks a lot for updating.

Would anyone be able to add the ability to display a description to a selected lisp command as shown in the image below. I think the description would have to be read from the same line as the lisp command definition. I don't know enough lisp to do it myself.

image.png.e4fd47b8e9e03087ae1c95c6af3c186c.png

 

image.thumb.png.d993e0dff6740cdb308ba2263ccf5448.png

 

snippet of the dcl window code as in the picture above

;; lisp description ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
"               : row { width = 60; alignment = centered;"
"                 : column {width = 20; alignment = centered;"
"                   :row {alignment = bottom;"
"                     : text { key = \"LispDescriptiontext\"; label = \"Lisp Description\"; width = 20; alignment = right;}"
"                   }"
"                 }"
"                 : column {width = 40; alignment = left;"
"                   : edit_box { key = \"LispDescription\"; label = \"\"; width = 20; alignment = right;}"
"                 }"
"               }"

 

 

Link to comment
Share on other sites

The only issue is must pick a lisp then could populate a dcl tile, for me would be read 1st 2 lines of lisp code.

 

; RUNLISP

; Creates a pop up dcl of lisp details.

 

Problem I have lisps that have multipe defuns so what happens then ?

 

What about adding a help button, you display a txt file open a mp4 etc.

 

Far simpler have a DOC or pdf called "how to" it had full instructions images etc about how to use the company lisps.

Edited by BIGAL
Link to comment
Share on other sites

When filling in the popup_list field, the program searches for "c:" so if there are more commands defined in the code, the command description should be added to each line with "defun c:" This is not a detailed instruction on how to use lisp, just a quick hint, a reminder of what a given command in lisp does.

 

runlisp.gif.37013db8c01c81b831c5d7ea6aa828c3.gif

Edited by wilda
Link to comment
Share on other sites

The way this LIPS works is that it searches through the LISP files and if it finds the text string "Defun c:" it will make up the list of LISPs.

 

It is possible to add a help line of text to this using the same method, while it is looking for "Defun c" also find a text string with any other text at the beginning of the line, create a second list and when you select a LISP it populates a text field in the DCL... so yes it is possible.... but for this little LISP quite a bit of work,

 

I do have something that does this, but would have to get chance to go through it, take out the company stuff and so on, so won't be an answer today.

 

 

On the otherside of this, I have 434 LISPs (yeah, I have have a LISP that counts LISPs....) and for example, for me each of these would need a text description added to make this a useful feature - some people have many more of course. I'd also recommend a LISP naming method that acts as a description. For example all my text LISPs start with TXT, line ones with LIN - which gives me half a chance of remembering what I want to use

Link to comment
Share on other sites

That's why I thought that once the line from "defun c": is found, it's easier to find in the same line the part of the description starting with the comment character ;;

 

 

I also do *TXT, BLK, LAY etc) but it's not enough. It is also impossible to describe everything in the name in two or three words (abbreviations). Such a one-sentence description to the program would give a lot, especially if one lisp has several commands. Of course, all lisp would have to be adapted to such RunLisp functionality. 

Link to comment
Share on other sites

This is like "FINDSTR" a windows function so find "Aliasedit" on my PC it can search an entire disk, just takes a while. I use to find code I have done.

 

So maybe an option put in guess "Ali" Findstr works with this.

image.png.886fa74c7a079f995d312e3c569b7581.png

 

Like others around 3000 lisp files.

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...