Jump to content

Recommended Posts

Posted

Hi Guys

Is it possible to create a floating toolbar via lisp? at the moment i have to go onto each machine and create this toolbar manually. but wondering if it can be made via lisp

 

image.png.bccd6a8dbc9541e1eed5b9023b895f01.png

Posted

YES.

 

But a toolbar is so easy to make using Notepad. You can load custom toolbars using menu load, I had 2 custom toolbars, just copy the mnu or CUIX to a new pc and load it, all done.

 

Explain what the toolbar needs in terms of command, the second part is if you need to make custom icons they need to be 32x32 in size. There are ways to make them for LASB. Simple Character icons.

 

***MENUGROUP=ALSTOOLBAR
***TOOLBARS
**ALSTOOLS
ID_ALAN_0    [_Toolbar("Alans1", _Right, _Show, 0, 0, 1)]
ID_Matchprop [_Button("Match Properties", RCDATA_16_MATCH, RCDATA_16_MATCH)]^C^C_matchprop
ID_Erase     [_Button("Erase", RCDATA_16_ERASE, RCDATA_32_ERASE)]^C^C_erase
ID_Copy      [_Button("Copy", RCDATA_16_COPYOB, RCDATA_32_COPYOB)]$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_copy,^C^C_copy)
ID_Mirror    [_Button("Mirror", RCDATA_16_MIRROR, RCDATA_32_MIRROR)]$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_mirror,^C^C_mirror)
ID_Offset    [_Button("Offset", RCDATA_16_OFFSET, RCDATA_32_OFFSET)]^C^C_offset
ID_Array     [_Button("Array...", RCDATA_16_ARRREC, RCDATA_32_ARRREC)]^C^C_array
ID_Move      [_Button("Move", RCDATA_16_MOVE, RCDATA_32_MOVE)]$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_move,^C^C_move)
ID_Rotate    [_Button("Rotate", RCDATA_16_ROTATE, RCDATA_32_ROTATE)]$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_rotate,^C^C_rotate)

 

  • Like 2
Posted

i have custom images for my buttons how do yo select the location for them, how do you load this notepad file into autocad to create the toolbars?

Posted (edited)

Look at what I posted. That is copy of commands from the CUI plus some custom ones.

 

This is a full custom toolbar item

50mm         [_Button("50mm cont","50mm.bmp","50mm.bmp")]^c^c^c(load "changecontours6")

 

50mm a unique ID can leave out

[_Button("50mm cont" this is what the button is known as.

"50mm.bmp","50mm.bmp" this is my custom bitmaps you can have a 16x16 & a 32x32 image.

image.png.b20510d9edd635dff6fee8c09777855f.png

^c^c^c do Cancel 3 times as some commands need at least 2 if your in the middle of a command when you pick toolbar.

(load "changecontours6") run a lisp program.

 

So make a mnu file then use Menuload to load it into CAD.

 

Get stuck post what you have made here.

 

You can mix and match commands I have a drafting toolbar that has CIV3D commands added to it, this saves changing workspaces. 

 

 

 

 

Edited by BIGAL
Posted
On 21/06/2023 at 00:56, BIGAL said:

YES.

 

But a toolbar is so easy to make using Notepad. You can load custom toolbars using menu load, I had 2 custom toolbars, just copy the mnu or CUIX to a new pc and load it, all done.

 

Explain what the toolbar needs in terms of command, the second part is if you need to make custom icons they need to be 32x32 in size. There are ways to make them for LASB. Simple Character icons.

 

***MENUGROUP=ALSTOOLBAR
***TOOLBARS
**ALSTOOLS
ID_ALAN_0    [_Toolbar("Alans1", _Right, _Show, 0, 0, 1)]
ID_Matchprop [_Button("Match Properties", RCDATA_16_MATCH, RCDATA_16_MATCH)]^C^C_matchprop
ID_Erase     [_Button("Erase", RCDATA_16_ERASE, RCDATA_32_ERASE)]^C^C_erase
ID_Copy      [_Button("Copy", RCDATA_16_COPYOB, RCDATA_32_COPYOB)]$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_copy,^C^C_copy)
ID_Mirror    [_Button("Mirror", RCDATA_16_MIRROR, RCDATA_32_MIRROR)]$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_mirror,^C^C_mirror)
ID_Offset    [_Button("Offset", RCDATA_16_OFFSET, RCDATA_32_OFFSET)]^C^C_offset
ID_Array     [_Button("Array...", RCDATA_16_ARRREC, RCDATA_32_ARRREC)]^C^C_array
ID_Move      [_Button("Move", RCDATA_16_MOVE, RCDATA_32_MOVE)]$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_move,^C^C_move)
ID_Rotate    [_Button("Rotate", RCDATA_16_ROTATE, RCDATA_32_ROTATE)]$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_rotate,^C^C_rotate)

 

You mentioned that its easy to create via notepad but how do you load it inti autocad?

Posted (edited)

MENULOAD its that simple, follow what appears it asks for menu name, if exist unload and load again.

Edited by BIGAL
  • Like 1

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