Display full version of the post: Makro; Farbe nach Befehl wieder ändern

papamoik
24.02.2011, 14:45
Hallo zusammen
 
Ich möchte die Konstruktionslinien in einer anderen Farbe als der Layerfarbe zeichnen. Dazu wechsle ich im Makro die Farbe. Wie kann ich nun aber nach dem Makro die Farbe wieder auf die Layerfarbe wechseln?
 
mit folgendem Makro funktioniert es nicht, der 2. -farbe Befehl wird einfach ignoriert, da er nach dem Befehlsabruch kommt...
 
^C^C_-layer;se;0;;-farbe;253;_xline;_-farbe;vonlayer;
 
Besten Dnak im Voraus
 
Gruss
papamoik

John Connor
24.02.2011, 17:39
You have written a macro and it does not assigned the color to the layer that you have called for.  Is that correct?

papamoik
24.02.2011, 19:13
Hi John
 
I tried to write a macro which does the following steps:
- chang the Layer to Layer 0
- change color to color 253
- start the xline command
 
- after i have drawn the xline the colour should be set to the color of the actual layer (layer 0 here)
 
If I don't do this step, the color is set to 253 even when I chenage the layer for a new line...
 
The last command to change the color back to actual layer doesn't work. Is there a way to implement this command in this macro or do I have to do somesthing else?
 
Thank you
 
best regards
Mike

John Connor
24.02.2011, 20:01
So all you want to do is change the color back to "white" (the original color of layer 0) after you have drawn your Xline using this macro?

HAWDesigner
24.02.2011, 20:50
If you don't want the color to be 253, then remove it from the steps, no?


papamoik
24.02.2011, 21:12
Hi John
 
You got it!
 
This is what I want. I tried it with the command "-farbe; vonLayer" it means the active layer.
 
Regards
 
Mike

papamoik
24.02.2011, 21:14
Hi HAWDesigner
 
If it was that easy  
 
The construction lines have to be in color 253.
 
Regards
 
Mike

John Connor
24.02.2011, 21:34
Why not create a new layer for your construction lines rather than putting them on layer 0?  That should solve your problem.

HAWDesigner
24.02.2011, 21:43

If you want the color of your construction lines to be 253, then I suggest putting them on a layer with the color dedicated to 253. (As I just realized John also suggested. )You cannot change the color of a layer, draw an object on that layer, then expect the objects to remain that color when you change the layer color again. Unless, of course, you hard color the objects, in which case, you're not changing the layer properties, you're changing the object properties.
HAWDesigner2011-02-24 21:44:28

John Connor
24.02.2011, 22:12
It is not good practice to override your layer properties like color and linetype.  Do what we have suggested.

CarlB
24.02.2011, 23:06
l'll give a suggestion for what you'd like to do and let others advise you what's "proper".
After the "xline" command, you need 2 pauses (backslashes) for the 2 pick points, then an enter to end it. So something like:
 

^C^C_-layer;se;0;;-farbe;253;_xline;\\;_-farbe;vonlayer;

papamoik
25.02.2011, 07:35
Good morning everyone
 
Thank you for your suggestions.
 
I think I create a new layer for my construction lines as mentiond from John and HAWDesigner.
 
CarlB: your solution works for one time, second time it stops underway. But it gives me an idea of commands in macros.