Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Toolbar Button Macros

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
206 Views, 3 Replies

Toolbar Button Macros


I wish to create a number of toolbar buttons which
will enable symbols to be entered into a drawing.

I do not wish to be prompted for the symbol scale
(1:1) or rotation ( zero ) each time I call up a symbol, these will be the same
for each symbol. I would like to position the symbol on
the drawing using the pointing device once the symbol has been loaded.

 

The symbols and the associated button bitmaps will
be stored within a sub-directory of ACADLT.

 

The principal problem seems to be that, when ACADLT
sees the insert prompt, it automatically brings up the sub-menu requiring entry
of position, scale and rotation. Is the answer to disable the sub-menu, if
so, how is this achieved.

 

I would appreciate some assistance.

 

Regards,

 

Tony Brookes


size=2> 
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous



Here's a clip from my aclt.mns file:

**TB_ELECTRICAL_SYMBOLS_2

ID_Elec_Sym_2  [_Toolbar("Electrical Symbols 2", _Right, _Show,
1, 0, 1)]

ID__2          [_Button("2W",
"2w.bmp", "ICON_24_BLANK")]*^C^C-insert;2w;scale;$M=$(eval,$(getenv,dwgscale))

The '*' causes the command to repeat.  '-insert' calls the command
line version of the insert command.  '2w' is file 2w.dwg.  'scale'
calls the scale option of the insert command.  The '$M...' retrieves
the stored scaling value and passes it to the insert command.  Selecting
the insert point is the next normal step for the insert command and requires
no entry in the command string.

The dwgscale variable gets set by another button:

**SCALES

ID_Scales      [_Toolbar("Scales", _Floating,
_Hide, 234, 206, 16)]

ID__0          [_Button("1/8
Scale","1_8.bmp",

"ICON_24_BLANK")]^C^Cucsicon;off;blipmode;0;gridmode;0;snapmode;0;ltscale;24;setenv;dwgscale;96

Note that each line that starts 'ID_' should be on a single line. 
Your browser may split longer lines.

Martin

 

Tony Brookes wrote:

 I wish to
create a number of toolbar buttons which will enable symbols to be entered
into a drawing.
I do not
wish to be prompted for the symbol scale (1:1) or rotation ( zero ) each
time I call up a symbol, these will be the same for each symbol. I would
like to position the symbol on the drawing using the pointing device once
the symbol has been loaded.
 The
symbols and the associated button bitmaps will be stored within a sub-directory
of ACADLT.
 The principal
problem seems to be that, when ACADLT sees the insert prompt, it automatically
brings up the sub-menu requiring entry of position, scale and rotation.
Is the answer to disable the sub-menu, if so, how is this achieved.
 I
would appreciate some assistance.
 Regards, Tony
Brookes
 

Message 3 of 4
Anonymous
in reply to: Anonymous

Also, try exploring the HELP command in AutoCAD, and review
all the Commands and Variables, and the sections about writing macros, and
customizing LT. It is real simple, but requires a little bit of reading upfront
to figure out.

 


 

 

style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Here's
a clip from my aclt.mns file:

**TB_ELECTRICAL_SYMBOLS_2
ID_Elec_Sym_2  [_Toolbar("Electrical
Symbols 2", _Right, _Show, 1, 0, 1)]

ID__2          [_Button("2W",
"2w.bmp", "ICON_24_BLANK")]*^C^C-insert;2w;scale;$M=$(eval,$(getenv,dwgscale))

The '*' causes the command to repeat.  '-insert' calls the command
line version of the insert command.  '2w' is file 2w.dwg.  'scale'
calls the scale option of the insert command.  The '$M...' retrieves the
stored scaling value and passes it to the insert command.  Selecting the
insert point is the next normal step for the insert command and requires no
entry in the command string.

The dwgscale variable gets set by another button:

**SCALES
ID_Scales      [_Toolbar("Scales",
_Floating, _Hide, 234, 206, 16)]

ID__0          [_Button("1/8
Scale","1_8.bmp",

"ICON_24_BLANK")]^C^Cucsicon;off;blipmode;0;gridmode;0;snapmode;0;ltscale;24;setenv;dwgscale;96

Note that each line that starts 'ID_' should be on a single line. 
Your browser may split longer lines.

Martin
 

Tony Brookes wrote:

 I wish to
create a number of toolbar buttons which will enable symbols to be entered
into a drawing.
I do not wish to
be prompted for the symbol scale (1:1) or rotation ( zero ) each time I call
up a symbol, these will be the same for each symbol. I would like to
position the symbol on the drawing using the pointing device once the symbol
has been loaded.
 The
symbols and the associated button bitmaps will be stored within a
sub-directory of ACADLT.
 
size=-1>The principal problem seems to be that, when ACADLT sees the insert
prompt, it automatically brings up the sub-menu requiring entry of position,
scale and rotation. Is the answer to disable the sub-menu, if so, how is
this achieved.
 I would
appreciate some assistance.
 
size=-1>Regards,
 
size=-1>Tony
Brookes
 
Message 4 of 4
Anonymous
in reply to: Anonymous

>
I wish to create a number of toolbar buttons which
>will enable symbols to be entered into a drawing.

>
I do not wish to be prompted for the symbol scale
>(1:1) or rotation ( zero ) each time I call up a symbol, these will be the same
>for each symbol. I would like to position the symbol on
>the drawing using the pointing device once the symbol has been loaded.
>


Tony,

the command sequence to insert a symbol at 1:1 scale and rotation zero
is

-insert;YourSymbol;_scale;1;_rot;0;

Dietmar Rudolph

President, CR/LF GmbH, http://www.crlf.de
Vice-President Europe, CADLock, Inc. http://www.cadlock.com
Webmaster, AutoCAD Developers Group Europe, http://www.adge.org
Member of the Autodesk Discussion Forum Moderator Program

Author, "Mastering AutoCAD 2000 Objects", http://www.crlf.de/Verlag/PublishingServices.html

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost