TheSwamp

CAD Forums => CAD General => Topic started by: ROBBO on May 28, 2014, 04:17:29 AM

Title: How to add indefinite pause to command macro
Post by: ROBBO 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.

Title: Re: How to add indefinite pause to command macro
Post by: roy_043 on May 28, 2014, 05:09:08 AM
Code: [Select]
(while (/= (getvar 'cmdactive) 0) (command pause))
Title: Re: How to add indefinite pause to command macro
Post by: ROBBO 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.