Jump to content

Creating Buttons to put in a custom toolbar


SunnyTurtle

Recommended Posts

Hi

i have a custom toolbar that someone at my company made to do stuff that is unique to the company (ie run lisps and stuff.)

 

I want to make just one button and i have no idea how to do it i have a small understanding of lisp and don't know how do this from the code

If somone knows of a resource that i could learn about creating buttons.

 

P.S. i don't want somone to just make somthing want to see how its done

Link to comment
Share on other sites

Don't have Autocad in front of me now, although it is roughly the following: Type CUI into the command line. Create a new command (through which you can call a lisp routine) and there is an inbult icon editor in there even. Then just drag that command onto the toolbar you want it to display on.

Link to comment
Share on other sites

I want to make just one button and i have no idea how to do it i have a small understanding of lisp and don't know how do this from the code

If somone knows of a resource that i could learn about creating buttons.

 

You don't need any lisp or coding. Go here first and look for a "Show Me" link (near the top). This will present a video on how to create a command. Now go to this link and look for the "Show Me" link (about 1/2 way down the page). This will present a video on how to create a new toolbar and add your command to it.

Edited by rkmcswain
edited
Link to comment
Share on other sites

Hi again this is how i did it.

I typed cui as dink said this box then appears

1.jpg

create a new button by pressing the circuled button

2.jpg

i do not know how to load a lisp but u can just copy and paste a lisp where i marked in red and it will run when you press the button

Link to comment
Share on other sites

You can also just put the lisp name after the ^C^C and it will also work (provided the lisp file is loaded).

 

I.e. ^C^Cabc would run abc.lsp.

Link to comment
Share on other sites

You can also just put the lisp name after the ^C^C and it will also work (provided the lisp file is loaded).

 

I.e. ^C^Cabc would run abc.lsp.

 

Would this run a lisp in the search path or a lisp that has being pre-loaded or ran before because i am not allow to pre-load lisp that are to big or unessary

 

in other words is it posiable to run a lisp that is in your searchpath using C^C^ or somthing like that

Link to comment
Share on other sites

Would this run a lisp in the search path or a lisp that has being pre-loaded or ran before because i am not allow to pre-load lisp that are to big or unessary

 

It will search for a defined function named "abc".

 

in other words is it posiable to run a lisp that is in your searchpath using C^C^ or somthing like that

 

If you want to run a lisp and load it if it needs loaded, then use this syntax:

 

^C^C(if (not C:myfun)(load "mylispfile"));myfun;

 

...where "myfun" is the function name, and "mylispfile" is the file name. Include the path using double "\\" slashes or single "/" slashes if necessary.

Link to comment
Share on other sites

Thankyou rkmcswaim

I was using VisalLisp and was clicking on the help for load and i was getting the command load. (which i thought was the function load)

I was confused becasue it said it had somthing to do with shapes which the command does. but i didn't relises it was telling me about the command not the function.

 

I will defintaly use this function in the future as it allows my to get around the areas of autoCAD which my company has locked off

Once Again Thankyou

Link to comment
Share on other sites

  • 3 months later...

Hi all,

Please help me. How do I transfer all custom buttons from CAD 2008 to CAD 2010? and how do I created a custom button for isometric dim? Thanks.

Link to comment
Share on other sites

You can use the Migrate Settings wizard in your Start Menu under Autodesk, or you can use the Migration tools within the CUI

 

When you use the Wizard, I believe you'll have a "Migrated from AutoCAD2008" workspace that should look very much like your 2008 and then you can transfer anything in there to any other workspace through the CUI.

 

 

Transfer & Migrate Custom Settings

 

There's a useful video near the bottom if you expand the "Show Me: Migrate and Transfer Customizations" title.

Link to comment
Share on other sites

A suggestion you may be better off creating partial menu's and custom toolbars and loading these, this way when you get an upgrade its easy to add these menu's to the defualt ACAD.menu

 

As they are standalone its easy to make changes via notepad etc and then just reload.

 

eg lisp menu

 

***MENUGROUP=CompanySTDS
***POP1
[->LISP1 A-C]
            [ADD 2 LEVEL]^C^C(LOAD "add-to-levels")
            [Add-pits-drain]^C^C(LOAD "Add-pits-drain")
            [Allbylayer]^C^C(LOAD "Allbylayer")
.........
[<-]
   [->LISP2 C-H]
..............
[<-]

 

use rkmcswain method above of checking if lisp is loaded

 

My custom toolbar takes commands from various toolbars and groups them together into one big one so no wasted icons on buttons never used. 32 buttons just created a new one and copied commands etc.

 

With buttons save them to a location say same as lisps and you can create new ones using PBRUSH etc

Link to comment
Share on other sites

Thanks Nestly and Bigal for your help. I have another question :). I used to have isometric dimension on 2000 and 2008 but when I created a custom icon on 2010. I always have to obligue to make it look right. Can we have isometric dimension on 2010 or I have to oblique it after I dimesion. Thanks.

Link to comment
Share on other sites

Thanks Bigal.

I used to have a custom button for isometric dimension. When I click on that button and enter the dimesion I dont have to oblique or explore . I'm trying to have it on my new version but it's not work and I don't know how to fix it :(

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...