Author Topic: Lisp routine loader with slides  (Read 17597 times)

0 Members and 1 Guest are viewing this topic.

TJAM51

  • Guest
Lisp routine loader with slides
« on: September 15, 2004, 12:55:01 PM »
I am seeking some way and I realize it may require work of being able to pick from several slides and run a lisp routine. I do not wish to load any additional menus.  The following site has a outside routine that allows the insertion of blocks. I was wondering if the same principal could be applied to lisp routines....



http://www.jefferypsanders.com/autolisp_library.html

CADaver

  • Guest
Lisp routine loader with slides
« Reply #1 on: September 15, 2004, 12:56:32 PM »
I'm not real sure I understand what it is you're after, but will APPLOAD help?

M-dub

  • Guest
Lisp routine loader with slides
« Reply #2 on: September 15, 2004, 12:59:04 PM »
I'm pretty sure we talked about this before...

Someone else will have to confirm this, but I don't know if it's possible to have a slide library WITHOUT modifying the menu...


Anyone???

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #3 on: September 15, 2004, 01:20:36 PM »
What I seek is the ability to load lisp routines from a set of slides representing the lisp rotuine. It would require a dcl file and some form of slide library similar to the site mentioned earlier in this post. Does this make sense. I am attempting to avoid any and all menu loading

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #4 on: September 15, 2004, 01:29:00 PM »
http://www.jefferypsanders.com/autolisp_library.html


Go to this site. You will see that these are lba files (slide library) files that operate independently from the menu

M-dub

  • Guest
Lisp routine loader with slides
« Reply #5 on: September 15, 2004, 01:42:33 PM »
As far as I know, the code behind the Insert Block button would be something like:
^C^C-INSERT C:/Directory/drawing.dwg;
So yes, I think what you're after is possible.

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #6 on: September 15, 2004, 01:45:14 PM »
So all that would need to be done is to replace it with (load c:\xxx.lsp) for the lisp routine

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #7 on: September 15, 2004, 01:49:41 PM »
I am going contract. Companies hate to have their menus modififed or have another menu loaded on top or on the side of the orginal. This way all I have to do is maintain a directory with the slide libraries and the lisp rotuines. Easy to load and no way to step on anything else.

M-dub

  • Guest
Lisp routine loader with slides
« Reply #8 on: September 15, 2004, 01:53:48 PM »
> So all that would need to be done is to replace it with (load c:\xxx.lsp) for the lisp routine

As far as I know...This works for me...
Code: [Select]
^C^C(load"O:/Drawings/Menus-Blocks/LISP/MCR.lsp") COPROT;

>Easy to load and no way to step on anything else.

Done properly, a partial menu is just as easy, but I know I'm not going to be able to convince you to do that, so I'll stop now...  ;)

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #9 on: September 15, 2004, 01:58:38 PM »
But would that not only apply to one lisp routine. The blocks that are listed in the *. LBA files have a path for the block as well as the slide. This information is picked up by the rest of the routines. This allows many many blocks to be inserted by selecting the appropriate slide. What I am hoping is to have the ability to load numerous routines without having numerous dcl files. Does this make sense?

M-dub

  • Guest
Lisp routine loader with slides
« Reply #10 on: September 15, 2004, 02:14:29 PM »
This might require a phone call...But, yes, I'm pretty sure that's possible....if I understand you correctly.  I don't have anything set up like you're talking about, but I have essentially the same thing in a toolbar flyout (which I've only recently started).  Here's my toolbar and below are the macros behind each button.  The macro is what you'd put behind each slide instead of inserting a block.  Imagine the slide as a bigger, highly detailed toolbar button.

LispRoutines

^C^C(load"O:/Drawings/Menus-Blocks/LISP/CASE.lsp") CASE;\\;u;;
^C^C(load"O:/Drawings/Menus-Blocks/LISP/MCR.lsp") COPROT;
^C^C(load"O:/Drawings/Menus-Blocks/LISP/MCR.lsp") MOVROT;
^C^C(load"O:/Drawings/Menus-Blocks/LISP/SL.lsp") SL;
^C^CAPPLOAD;

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #11 on: September 15, 2004, 02:19:48 PM »
I have used many toolbars and I have plenty running right now. My serach is a way to have the same method without ever modifying or loading an additional menu. For whatever reason despite the fact the menu loading is named correctly I have always had some problem or another. When I came across this routine about insreting blocks I was seeking the same method but being able to use lisp routines as well. The nice thing about this method is that it requires outside loading with no interference with any menu.

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #12 on: September 15, 2004, 02:22:05 PM »
One more really weird thing was that one company I worked for wanted all screens to look alike. So when I placed my toolbars in place I was throughly scolded for being non standard. With this method I can secretly load what I need without being chewed out.

M-dub

  • Guest
Lisp routine loader with slides
« Reply #13 on: September 15, 2004, 02:23:13 PM »
Agreed...
All you should have to do is replace the code that inserts the block with code that loads the lisp routine.

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #14 on: September 15, 2004, 02:26:01 PM »
I understand that but if I did that with the name of the lisp routine would that not call up that routine no matter what slide I was on and this would require a separate file for every lisp routine I have. Maybe I am not understanding fully

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #15 on: September 15, 2004, 02:30:22 PM »
Here is the button information


}
              : button {
                label = "Insert Block";
                key = "insert";
                fixed_width = true;
                width = 8;
                mnemonic = "I";
                is_tab_stop = true;


This is the only entry inserting a block. If I replace this with load lisp in order to have an associateiong with the slides this wiould have to be a wild card....maybe not

M-dub

  • Guest
Lisp routine loader with slides
« Reply #16 on: September 15, 2004, 02:36:49 PM »
Ok, I think I'm lost now...
Where's that code from?  Do you have any files you could send me to play with?

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #17 on: September 15, 2004, 02:40:44 PM »
There are several files. The files are generated after you compile the LBA files. The files are as follows:



LIBRARY.LBA (libraryfile)


C:\Program Files\ACAD2000\SUPPORT\Cpdead_side.sld
I:\Project Coordination\blocks\New Blocks\Monostand\CP+\Cpdead_side.dwg
C:\Program Files\ACAD2000\SUPPORT\Cpdead_top.sld
I:\Project Coordination\blocks\New Blocks\Monostand\CP+\Cpdead_top.dwg
C:\Program Files\ACAD2000\SUPPORT\Cpend.sld
I:\Project Coordination\blocks\New Blocks\Monostand\CP+\Cpend.dwg
C:\Program Files\ACAD2000\SUPPORT\Cpstress_side.sld
I:\Project Coordination\blocks\New Blocks\Monostand\CP+\Cpstress_side.dwg
C:\Program Files\ACAD2000\SUPPORT\Cpstress_top.sld
I:\Project Coordination\blocks\New Blocks\Monostand\CP+\Cpstress_top.dwg


LIBRARY.DCL

LIBRARY : dialog {
          label = "Block Library Application - Copyright 2004 by JefferyPSanders.com  All rights reserved.";
          : text {
            key = "sldname";
          }
          : boxed_column {
            : row {
              : image {
                key = "sld";
                height = 20;
                aspect_ratio = 1.5;
                color = 0;
                is_tab_stop = false;
              }
              : column {
                : popup_list {
                  key = "libraries";
                  multiple_select = "FALSE";
                  width = 25;
                }
                : list_box {
                  key = "sldlist";
                  height = 15;
                  width = 25;
                  is_tab_stop = true;
                }
              }
            }
            : row {
              : button {
                label = "Create a New Library";
                key = "create";
                fixed_width = true;
                width = 8;
                mnemonic = "N";
                is_tab_stop = true;
              }
              : button {
                label = "Load a Library";
                key = "loadlib";
                fixed_width = true;
                width = 8;
                mnemonic = "L";
                is_tab_stop = true;
              }
              : button {
                label = "Close Program";
                key = "cancel";
                fixed_width = true;
                width = 8;
                mnemonic = "C";
                is_cancel = true;
                is_tab_stop = true;
              }
              : button {
                label = "Insert Block";
                key = "insert";
                fixed_width = true;
                width = 8;
                mnemonic = "I";
                is_tab_stop = true;
             }
            }
          }
         }
LAYSEL : dialog {
  label = "Layer Selection - Select layer to use for insertion.";
  : column {
    : row {
      : boxed_column {
        : list_box {
          key = "layerlist";
          label = "Layers";
          multiple_select = "FALSE";
          width = 40;
        }
      }  
    }
    : row {
      : boxed_row {
        : button {
          key = "accept";
          label = "  Okay  ";
          is_default = true;
        }
        : button {
          key = "cancel";
          label = "  Cancel  ";
          is_default = false;
          is_cancel = true;
        }
      }
    }
  }    
}



You should have the orginal lisp file. When you pull up the lisp file there is  button called Create a new library and one called load a library.

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #18 on: September 15, 2004, 02:42:07 PM »
The library.lba file is compiled when you compile the slides and the locate the blocks.

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #19 on: September 15, 2004, 02:51:46 PM »
The way I see it is that small drawings representiong each lisp routine would have to be generated. Once this was done the program would compile these into *.sld to be placed into the LIBRARY.LBA. The next step based on the orginal program would be to locate the slides and the dcl file, etc in the same directory.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Lisp routine loader with slides
« Reply #20 on: September 15, 2004, 03:06:52 PM »
Here are some examples of what can be done with a DCL & slides.
Note the buttons.

http://www.theswamp.org/lilly.pond/CAB/ARCH_DIALOG.pdf
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #21 on: September 15, 2004, 03:16:45 PM »
Now that is what I am talking about

M-dub

  • Guest
Lisp routine loader with slides
« Reply #22 on: September 15, 2004, 03:19:14 PM »
Yep...
Good luck with that.  It's way over my head for now.  I don't have the time to get into that.  Wish I did, but I couldn't justify it to the higher-ups.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Lisp routine loader with slides
« Reply #23 on: September 15, 2004, 04:10:07 PM »
Quote from: TJAM51
Now that is what I am talking about


 :)


Start reading here
http://www.google.com/groups?as_q=DCL&as_epq=fowler&safe=images&ie=UTF-8&as_ugroup=autodesk.autocad.customization&lr=&hl=en

Search on Gary Fowler for more DCL info.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Lisp routine loader with slides
« Reply #24 on: September 15, 2004, 07:02:46 PM »
I have talked to Gary quite extensivley about how he creates his buttons.  It is alot of work.  The suggetion I have is if you use the image tile dialog
that is located in base.dcl copy it to a new file and call it whatever you want.  Now all we need to do is ceate the code to insert the blocks.  Iwould suggest using generaic names for the tile this way we could use library files (text based) to load differant block into the image tile dialog this will also keep the coding simple as well.  As far as the slides, this can be accomplished with a script to open, zoom all, then run mslide then move to the next dwg.  This can be done on an entire directory pf dwg's

I am not at work but I believe I have alot of the code that is needed to accomplish this task.  I will be at work in the morn.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

TJAM51

  • Guest
Lisp routine loader with slides
« Reply #25 on: September 16, 2004, 07:22:13 AM »
Sounds good......I need something that is solid and stable and will have no adverse affect on the existing acad menu. It always seems no matter how careful I have been in the past something always went wrong.