Jump to content

Macro to do 2 things to one selection set


Recommended Posts

I am attempting a macro to change the colour of selected objects. I always want these objects to be sent to the back at the same time.

 

So I wrote the following:

 

^C^Cchprop color 13;;_ai_draworder _Back p;

 

The p at the end is my attempt at selecting the previous selection set, but I cannot get it to work; it just stays in the command asking for more objects. A right click with the mouse would normally work, but I cannot replicate that in the macro.

 

Even better would be if I could end the button macro having performed the commands but still leaving the objects selected.

 

The problem is that CHPROP and DRAWORDER both cancel the selection set after performing their command.

Link to comment
Share on other sites

  • 2 weeks later...

Wow. How did you get so good at macros? That works perfectly.

 

I admit I left for a couple of days because usually when trying a new macro I need an hour or so to test it thoroughly!

 

Can you explain what the "select au \" is? I do not recognise "au" and I originally did not think that "\" would work for me because there are always a different number of objects, depending on the job, and my experience told me I would need a separate "\" for each one.

Link to comment
Share on other sites

Can you explain what the "select au \" is?

Select > Auto > pause for input

 

from Help

Auto

Switches to automatic selection: pointing to an object selects the object. Pointing to a blank area inside or outside an object forms the first corner of a box defined by the Box method.

 

Box

Selects all objects inside or crossing a rectangle specified by two points. If the rectangle's points are specified from right to left, Box is equivalent to Crossing. Otherwise, Box is equivalent to Window.

 

Link to comment
Share on other sites

I think it acts the same with or without the au.

The au is probably in there for legacy purposes... the macro was cut/pasted from an old menu and edited for your use.

Link to comment
Share on other sites

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