Jump to content

"Change" Macro


johnengineer

Recommended Posts

I would like to create a macro using the "change" command. I would like to have it change the objects I select to bylayer color. How can I achieve this with the control characters used in macros?

Link to comment
Share on other sites

^C^CSELECT\CHPROP;P;;C;;;

 

The select at the beginning allows user to select using various methods. The "chprop" command then calls the "previous" selection, changes "Color" to "Bylayer" (the default)

Link to comment
Share on other sites

Lee, this is what I've read about the start of a macro:

 

"Cancel Running Commands

Make sure that you have no AutoCAD commands in progress before you execute a macro. To automatically cancel a command before executing a macro, enter ^C^C at the beginning of the macro (which is the same as pressing ESC twice). Although a single ^C cancels most commands, ^C^C is required to return to the command prompt from a dimensioning command and ^C^C^C is required based on the current option of the Layer command. ^C^C handles canceling out of most command sequences and therefore is the recommended sequence used to ensure no command is active before the macro is started."

 

I am no expert though, I like to create alot of macros but it seems I have to do alot of trial and error to get one correct, each command seem to act different or combination of commands, CalB's didn't work for me as it is

Link to comment
Share on other sites

Thank you for the information Ghost - I understand things a lot better now.

 

It makes sense to cancel command before starting macros - I suppose the alternative to error handling in LISP.

 

I would be inclined to put ^C^C^C^C in front of my macro going by your post!

 

Thanks :)

Link to comment
Share on other sites

I see now, I got the space after the select but didn't think the semi colon was needed but yes that works perfectly now.. COOL, thanks ..

(one day I'll understand all this....LOL)

Link to comment
Share on other sites

In my understanding, I thought that a space/semicolon/new-line all did the same thing - like in a script.

 

But I don't work with macros, scripts much at all, so I could be wrong.

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