Author Topic: How to add indefinite pause to command macro  (Read 1589 times)

0 Members and 1 Guest are viewing this topic.

ROBBO

  • Bull Frog
  • Posts: 217
How to add indefinite pause to command macro
« on: May 28, 2014, 04:17:29 AM »
Hello All,

I have a command macro thus:

Code: [Select]
^C^C^P(if
(not(tblsearch "LAYER" "G-PATT"))
(command "-layer" "m" "G-PATT" "C" "1" "G-PATT" "L" "Continuous" "G-PATT" "LW" "0.18" "G-PATT" "D" "Textures and hatch patterns" "G-PATT" "")
(command "-layer" "m" "G-PATT" "C" "1" "G-PATT" "L" "Continuous" "G-PATT" "LW" "0.18" "G-PATT" "D" "Textures and hatch patterns" "G-PATT" "Y" "")
)(command "HatJig" pause "layerp")

But would like to add an indefinite pause to allow the hatch to be completed and then return to the previous layer.

Having trouble changing back to previous layer. Any assistance would be much appreciated.

Kind regards, Robbo.

The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: How to add indefinite pause to command macro
« Reply #1 on: May 28, 2014, 05:09:08 AM »
Code: [Select]
(while (/= (getvar 'cmdactive) 0) (command pause))

ROBBO

  • Bull Frog
  • Posts: 217
Re: How to add indefinite pause to command macro
« Reply #2 on: May 28, 2014, 05:17:02 AM »
Code: [Select]
(while (/= (getvar 'cmdactive) 0) (command pause))

Thank you very much roy_043. Replaced pause with (while (/= (getvar 'cmdactive) 0) (command pause))

Kindest regards, Robbo.
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)