Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Run some kind of lisp to display window with loaded lisp information

14 REPLIES 14
Reply
Message 1 of 15
Nathan_Tigner
710 Views, 14 Replies

Run some kind of lisp to display window with loaded lisp information

Hello all,

I was hoping to pick your brains for some ideas.

 

I am the CAD manager for a company with around 300 CAD and Civil 3D licenses. I utilize acaddoc.lsp to autoload many lisps for the entire company.

 

What I am looking for are some ideas on how to communicate to the rest of the company, (multiple offices and states), what lisps are loaded, their commands and a description.

 

Each user has a custom ribbon loaded that I created, and I wanted to put a button in the ribbon that will run some kind of lisp to display a dialog that gives the COMMAND and DESCIPTION.

My first though was just a simple alert window, but the formatting doesn't work, and it looks pretty terrible when the description is too long and it word wraps.

 

My second though, and the only other idea I have, would be to put the info into an html document and then use an intermodal window to display it, but I would like to not have to keep an html document formatted.

 

Any ideas would be greatly appreciated.

 

Thanks!

 

Labels (3)
14 REPLIES 14
Message 2 of 15
paullimapa
in reply to: Nathan_Tigner

If you don’t mine having that file accessed from a shared location and assuming that is the same description for all users then you can even generate a pdf so the original source is never accessed. Then you can use lisps startapps function to launch the pdf reader on the pdf file


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 3 of 15
Kent1Cooper
in reply to: Nathan_Tigner

Can you have a button just SHELL out and open up something like a plain-text file in Notepad?  Or a .PDF document?  Or, without going outside AutoCAD, just Open a drawing with the information as Text/Mtext?  How many are "many" commands [which, beyond just a few, sounds inappropriate for an (alert) to me anyway]?

 

EDIT:  Using (startapp) instead of SHELL, like this for a plain-text file of command names and descriptions:

(startapp "notepad" "X:/Your/File/Path/YourFile.txt")

Kent Cooper, AIA
Message 4 of 15
Sea-Haven
in reply to: Nathan_Tigner

Like Kent's example can open movies etc I have  a client I work with and they have server based movies, I can not run them as I am not an approved user, but I make their menu's with the links.  Another simple one is VSLIDE, you can make a slide and display it reflecting function being used with objects part of slide.

 

We had a directory on our server called "How "to" which had lots of help subjects. Oh yeah can open word Docs etc. 

 

To make just open Word and cut and paste from Cad relevent help.

 

 

[Help and Tutorials]^c^c(command-s "browser" "https://............

 

 

Message 5 of 15
john.uhden
in reply to: Nathan_Tigner

@Nathan_Tigner ,

Back in the Jurassic period I served some time as a CAD Manager and wrote a lot of add-ons for Softdesk and Land Desktop.

I built a DCL menu of all the AutoLisp commands (that I wrote) with a search for any related command, and as one picked one from a list_box it would display the description in another list_box and provided an "Execute" button.

The textual information was contained in one file which was loaded (quickly) each time the primary command was run.  Or maybe I built it into a VLX.  Don't matter; it just worked.  Catch me in the right mood and I might share it with you (if you have sufficient AutoLisp skills).

John F. Uhden

Message 6 of 15
Sea-Haven
in reply to: Nathan_Tigner

Sounds like a good idea John but around 150 lisps here.

SeaHaven_0-1706848355916.png

We did have a Word doc that had explanations of the commands, maybe make a Help at end of each Lisp "A" etc so all "A's" in sub list choose lisp again from menu and help appears.

 

Just a comment worked in an enviroment like 30 Cad stations not 300 but never added anything to Acaddoc.lsp always used custom menu's etc new upgrades were handled via a lisp to rebuild correct paths and load menu's. Stuff like Plot got user Id, so sent output to correct printer on their floor, we were 5 stories building, with printers all over the place, the exception was the A0 plotter was on 5th floor.

 

Message 7 of 15
john.uhden
in reply to: Sea-Haven

@Nathan_Tigner ,

Are you saying 150 AutoLisp command functions, or 150 files, some of which are support functions?

If it is 150 commands, then you could do as the Romans... divide and conquer with a popup_list for categories, yet the search could be through all 150.

John F. Uhden

Message 8 of 15
ronjonp
in reply to: Nathan_Tigner

I put together an HTML help file (*.chm) about 15 years ago. It was nice because you could search for key words to look for routines. I'm sure there are much better ways to go about this these days but it still works pretty well for me 🙂

ronjonp_0-1706904634879.png

 

Message 9 of 15
john.uhden
in reply to: ronjonp

@ronjonp ,

Now that IS a good idea!

I wonder if you can include a .CHM in a .VLX.

John F. Uhden

Message 10 of 15
CodeDing
in reply to: ronjonp


@ronjonp wrote:

I put together an HTML help file (*.chm) ...


I have only created 1 CHM file ever, but it could NOT be viewed if it was opened from a network location. I know it's POSSIBLE, but it takes someone with more skill than me to enable it lol. It had to be saved, then opened from a Local file location.

 

Just something to be weary of if you go this route.

 

Best,


Need AutoLisp help? Try my custom GPT 'AutoLISP Ace':
https://chat.openai.com/g/g-Zt0xFNpOH-autolisp-ace
Message 11 of 15
john.uhden
in reply to: CodeDing

@CodeDing  & @ronjonp ,

Now I remember.  It was decades ago when I turned some kinda file into an HTML, which worked fine in AutoCAD.

John F. Uhden

Message 12 of 15
Sea-Haven
in reply to: ronjonp

Agree, ronjonp nice answer to a problem.

 

Also the help button, Alert says "Go see John he can help, ps take beer   Johny Walker Black" 🤣

Message 13 of 15
john.uhden
in reply to: Sea-Haven

@Sea-Haven ,

You should know better.  Not beer, Walker Black.

John F. Uhden

Message 14 of 15
hak_vz
in reply to: Nathan_Tigner

For such tasks I mostly use PDF help.

 

(defun open_help()(startapp (GetAdobePath) _help_file_path))
(defun GetAdobePath ( / AcroDoc AcroPath str->lst)
    (defun str->lst (str del / pos )
     (if (setq pos (vl-string-search del str))
       (vl-remove "" (cons (substr str 1 pos) (str->lst (substr str (+ pos 1 (strlen del))) del)))
       (list str)
     )
    )
 (if
   (and
     (setq AcroDoc (vl-registry-read "HKEY_CLASSES_ROOT\\.pdf"))
     (setq AcroPath(vl-registry-read(strcat "HKEY_CLASSES_ROOT\\" AcroDoc "\\Shell\\Open\\Command")))
   )
    (car(str->lst AcroPath (strcat "\"")))
 )
)

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Message 15 of 15
Sea-Haven
in reply to: Nathan_Tigner

nathan.tigner its your turn now.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report