Custom Buttons

Custom Buttons

twedgewood28
Community Visitor Community Visitor
549 Views
5 Replies
Message 1 of 6

Custom Buttons

twedgewood28
Community Visitor
Community Visitor

I have some drafting tickets that I need to create custom buttons for.  I am new to learning LISP.  I need buttons for the following attributes:

 

Length

Thickness

Height

Cube / Total Cube (Based off quantity x Cube)  Maybe one button to calculate both??

 

Like I said I am new to this just needing some assistance.

 

See attached ticket file.

0 Likes
550 Views
5 Replies
Replies (5)
Message 2 of 6

MrJSmith
Advocate
Advocate

Are you creating a DCL? Or are you creating buttons on the ACAD ribbon? This has everything you need to know to create a DCL: https://www.afralisp.net/dialog-control-language/

0 Likes
Message 3 of 6

twedgewood28
Community Visitor
Community Visitor

Trying to create a button on the AutoCad Ribbon. 

0 Likes
Message 4 of 6

paullimapa
Mentor
Mentor

Many can be found on-line by just doing a simple search to customize the ribbon:

By adding a new panel:

https://www.youtube.com/watch?v=fW0WqLp6czo

To add a button:

https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/How-to-add-a-butto...

More cutomizations:

https://www.synergis.com/2017/06/08/tip-customizing-the-autocad-ribbon/

Adding Partial menus:

https://www.youtube.com/watch?v=5mtpNkfkTi0


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 6

pendean
Community Legend
Community Legend

@twedgewood28 wrote:

Trying to create a button on the AutoCad Ribbon. 


To be clear, you want to create buttons in the Ribbon that can replace each of these with some number from some source to be determined automatically, yes?

pendean_0-1714596061032.png

 

And at these locations, one entry is in inches and the adjacent is a conversion to... mm? cm? not related to the inches?

pendean_1-1714596172532.png

 

Were are these LISPs-inside-the-buttons getting the information from please? Will the user type a response to each prompt? Or...?

0 Likes
Message 6 of 6

Sea-Haven
Mentor
Mentor

For me use this program it is a library program that asks the questions you want, its like 3 lines of code that is all.

SeaHaven_0-1714629315208.png

You must save it in a support path so it can be autoloaded.

 

(if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq ans (AH:getvalsm (list "Enter values " "Length " 5 4 "6" "thickness " 5 4 "1" "Height " 5 4 "6" )))
(setq Len (atof (nth 0 ans))
    Thick (atof (nth 1 ans))
    Ht (atof (nth 2 ans))
)

 

Part 2 is update your block attributes.

 

As I said make your ticket a block with attributes Length, Thickness, Height, Cube, Totcubes.

 

Oh yeah what are you drawing is it cubes that can be done also.

 

 

0 Likes