LISP routine - Slot List

LISP routine - Slot List

RockyBrown4134
Collaborator Collaborator
1,540 Views
7 Replies
Message 1 of 8

LISP routine - Slot List

RockyBrown4134
Collaborator
Collaborator

I have attached a simple "Alert" lisp file that list out the standard punch sizes that we use on a daily basis. I have a button on a toolbar that invokes the routine. All I want is just to provide the information only. the way I have it now creates a long and narrow alert dialog. Is there a better, or another way to achieve the same task?

 

Thanks.

 

slot_list.jpg

If this response answers your question, Please mark this response as "Accept as Solution"

Rocky Brown
AutoCAD 2020 / Inventor 2020 / Plant 3D
0 Likes
Accepted solutions (2)
1,541 Views
7 Replies
Replies (7)
Message 2 of 8

Kent1Cooper
Consultant
Consultant
Accepted solution

What do you mean by "provide the information only"?  All the same information as in that (alert), but in some different format?  If so, can you describe it, or post an image of what you want it to look like?  You could certainly put several hole/slot combinations on one line even in the format you already have, and shorten it vertically.  You could string things out in a (prompt) at the Command: line instead of by using (alert).  You could make a Slide and have the routine call that up.  You could abandon the AutoLISP approach and give everyone a chart to put on their wall.  You could....

Kent Cooper, AIA
Message 3 of 8

RockyBrown4134
Collaborator
Collaborator

@Kent1Cooper wrote:

"What do you mean by "provide the information only"?  All the same information as in that (alert), but in some different format? "


Exactly. Just Information as displayed.

 

"You could certainly put several hole/slot combinations on one line even in the format you already have, and shorten it vertically."

 

Thought about that after I posted the comment.

 

"You could string things out in a (prompt) at the Command: line instead of by using (alert). "

 

I'll try this approch and see what happens.

 

 

"You could abandon the AutoLISP approach and give everyone a chart to put on their wall. "

1) Management wants to go "Green", and doesnt want charts hanging all over the place.

2) If the list needs to be updated, I'd rather update it in one place that worry about people replacing their own "chart on the wall".


 

 

If this response answers your question, Please mark this response as "Accept as Solution"

Rocky Brown
AutoCAD 2020 / Inventor 2020 / Plant 3D
0 Likes
Message 4 of 8

Kent1Cooper
Consultant
Consultant

@Kent1Cooper wrote:

....  You could make a Slide and have the routine call that up.  ....


It occurs to me that one big advantage of the Slide approach over either a modified (alert) or a (prompt) is that it can have some graphic quality to it -- you can have different parts in different fonts, sizes, and/or colors [such as, for example, to highlight the more-commonly-used ones], have Text elements at different orientations [some heading running up the left side, perhaps?], make it in a chart- or table-format with lines [which can also be in different colors or weights to help differentiate things], add drawn diagrammatic elements, a company logo in the corner, etc., etc.  That would be in a Slide file in some commonly-accessible Network location, generated out of a Drawing file, and when you need to update the information, just edit it in that Drawing and generate a replacement Slide file.  If you're not familiar with Slides, look into the MSLIDE and VSLIDE commands.

Kent Cooper, AIA
Message 5 of 8

Kent1Cooper
Consultant
Consultant

Another thought occurs to me....

 

If you're using this in AutoCAD, can I assume that people are drawing these holes and slots?  Are they drawn as Blocks?  You could put them all as appropriately-named Blocks into a single Drawing file, and have whatever is calling up this (alert) instead go into the AutoCAD Design Center [ADC], which can be made to come up already in the Blocks listing of a specific drawing:

 

(command "adcenter" "adcnavigate" "X:/Your/Network/File/Path/YourHolesAndSlots.dwg/Blocks")

 

Then, instead of just being able to see the textual information about the choices, a User could see what all the available Block names are, pick on the one they want, even see a preview image of it, and go directly into Inserting it.  You can also include a Layer setting in the routine if appropriate, etc.

 

Then when something needs to be updated, you just open that source Drawing, and make new Blocks and/or Purge any that have become obsolete.  You don't need to update any textual content anywhere at all -- the current crop of available Blocks will automatically appear updated in the ADC dialog box.

Kent Cooper, AIA
Message 6 of 8

RockyBrown4134
Collaborator
Collaborator
Accepted solution

@Kent1Cooper wrote:

put several hole/slot combinations on one line even in the format you already have, and shorten it vertically


Got this to working and everyone seems fine with it for now.

 

Slots are created with a list program that looks to see if a block name already exists based on the width and length. Is so, it inserts the block. If not, I creates a slot, then blocks it with the name based on the width and length.

 

I like the "slide" idea and the AutoCAD Design Center [ADC] idea. I have used slides before in the past versions, but got away from them because i personally like Tool Palettes. The ADC idea may be a next step.

 

For now, I have a Band Aide on it.  Thanks for the two ideas. I'll play around with them and  see what happens.

If this response answers your question, Please mark this response as "Accept as Solution"

Rocky Brown
AutoCAD 2020 / Inventor 2020 / Plant 3D
0 Likes
Message 7 of 8

scot-65
Advisor
Advisor

Try in DCL?

 

54d8f7ba.gif

 

 

Limited testing.

You fill out the rest.

Strip out the ".txt" suffix of attached file as ZIP's will not attach (2 files inside).

 

Good Luck!

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

Message 8 of 8

scot-65
Advisor
Advisor

Here's another method.

Click in either list box.

 

54d9fa2d.jpg

 

Bling minimized.

 

Good Luck!

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.