CoCreate User Forum

CoCreate User Forum (https://www.cocreateusers.org/forum/index.php)
-   Customization (https://www.cocreateusers.org/forum/forumdisplay.php?f=12)
-   -   NEED MACRO line color (https://www.cocreateusers.org/forum/showthread.php?t=8026)

jim78b 10-24-2012 11:09 PM

NEED MACRO line color
 
hello everyones, you could kindly help me. I need some buttons that have various colors by selecting the line without having to make too many steps. I osd drafting 2008.
I could use the same method on lines ... Can you? all the macros that I have seen on the net are in German!:)

Gerard Leclercq 10-31-2012 03:40 PM

Re: NEED MACRO line color
 
Jim,
Your question is a little bit unclear for me. Do you want buttons which enter a command line with defined colour ? Something like, for example :

Button 1 : LINE RED
Button 2 : LINE GREEN
Button 3 : LINE BLUE
...

jim78b 11-01-2012 01:34 AM

Re: NEED MACRO line color
 
yes! and different linetype

Gerard Leclercq 11-02-2012 09:37 AM

Re: NEED MACRO line color
 
Jim,

Here is an example. Create a new text file whose name is "Line color.m" which contains :

DEFINE_ENCODING 'UTF-8'
{ Macro file containing Toolbars definition }
{ Written by ME10 version 17.0 }

TOOLBAR DEL_OLD 'tlb_line_color' END
TOOLBAR_ITEM OVER_WRITE 'btn_ldg' CAPTION 'LDG' TOOLTIP 'Draw a line dashed green' ON_ACTION 'LINE DASHED GREEN' ADD_TO_TOOLBAR 1 END
TOOLBAR_ITEM OVER_WRITE 'btn_lsr' CAPTION 'LSR' TOOLTIP 'Draw a line solid red' ON_ACTION 'LINE SOLID RED' ADD_TO_TOOLBAR 2 END
TOOLBAR CAPTION 'Line color' FLOAT 353 188 2 END

TOOLBAR_SHOW ICON END

TOOLBAR_LAYOUT REFRESH END


Then do on Drafting :

Setup > Customize > Load Toolbars : Line color.m

You will get a new toolbar with two buttons, that you can easily customize :

- Customize the button.
Right click on one button.
Edit Toolbar Item ...

- Add a button
Right click on any toolbar.
Customize Layout ...
Toolbar Items ...
Add ...
Then fill the form.

Gerard

Manuel Olvera 09-29-2016 03:25 PM

Re: NEED MACRO line color
 
jim78b, you've tried?


All times are GMT -8. The time now is 11:13 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.