Jump to content

macro to 1st set layer to REV before creating revision cloud, then return to previous active layer


Recommended Posts

Posted

Fist off, I realize this can be done with the tool palette. For my personal education on learning Diesel, I want to figure out the code to do this with a macro.

 

Assuming the layers already exist, the following works flawlessly with the dimlinear command:

^C^C-layer;set;DIMENSION; _DIMLINEAR;\\\LAYERP

 

However, the behavior is inconsistent when the revision cloud command is substituted. While testing in various drawings, once in a while it returns to the previous layer, but most of the time the REV layer stays active:

^C^C-layer;set;REV; _^Rrevcloud \\\layerp

 

I've tested with various combinations of a "space" and/or semi-colon after the revcloud command, but nothing seems to make the macro work as intended. I'm sure there is some sort of Diesel syntax thing going on. Any suggestions?

Posted

In AutoCAD LT, type CUI and review the standard revision cloud command. The "_R" prefix is there, though I'm not yet familiar enough with the command syntax to understand what the prefix designates.

 

Either way, with or without the "_R" prefix, the macro DOES set the layer to REV and execute the revcloud, but does NOT return to the previous active layer. It seems there is something in AutoCAD's processing of the revcloud command that causes the macro to exit after the command, ignoring the \\\layerp function.

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