News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Macro to load toolboxes

Started by Pearco, June 29, 2014, 07:29:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pearco

I am trying to load specific custom toolboxes by way of a macro when I need them on the screen. Is there a sys # for this type of macro. The toolboxes are only used with specific types of drawings and I would like to not have to load manually each time I need them. Another words is it possible with a macro?

Thanks
Jim
User since ProDesign 1.5

prl

Jim,

Should be possible.

>LoadToolBox to add the toolbox by name to the available toolbox list.

>ShowToolBox with name to toggle visibility on/off

>RemoveToolBox to delete it from the available toolbox list.





Pearco

Thanks Prl;

After I posted and had some time to think, I thought maybe the load command might work. Later this afternoon I will have time to try it.

Thanks again
Jim
User since ProDesign 1.5

Lar

#3
Below is the code to show/don't show custom toolboxes (built-in toolboxes are below)...

In one macro you can use the >ShowToolbox routine for each different custom toolbox you want to show. For each toolbox that is not yet loaded into dcad you will get a 'command failed' error message.

Lar


>ShowToolbox
{
<Toolboxname "name goes here (in quotes)" 'use the name that is at top of the custom toolbox file, which may or may not be the same as the filename...
<Visible 1    '1=show, 0=don't show
}

'built-in toolboxes...
sys(226)=1 'Color Toolbox
sys(222)=1 'Snap Toolbox
sys(219)=1 'Layer Toolbox
sys(220)=1 'Toolbar
sys(221)=1 'Main Toolbox
sys(224)=1 'Coordinate bar
sys(225)=1 'Viewing Toolbox

prl

Jim and Lar,

Thanks for bringing up this topic.  I needed to create some sort of onscreen heads-up indicator for two different solid modeling modes I'm testing ( ;)), and this toobox on/off visibility approach will do that for me.

Pearco

Thanks to both. I click on and all four are there. I click off and they are gone. Just what I was after.

Thank again
Jim
User since ProDesign 1.5