SimpleScott
Posts: 49
Joined: Tue Jan 12, 2016 7:23 pm

Re: Pause at height?

mroek wrote:@SimpleScott Unfortunately, there is nothing in that thread about wildcard searching. As I wrote, the issue is that the REPLACE command seems to need the full source text to replace, so you can't just use the layer number in the command. The given example in that thread shouldn't really work either, but perhaps S3D doesn't add the additional Z-height text for all printers.
You don't need wild cards to do what the OP in this thread asked (i.e., pause/move, wait for user, continue).

The example given at the top of this thread doesn't work because it searches for "; layer xx\n" and the \n at the END of that search parameter doesn't match a line which has the "Z =" information appended. But if you search just for "; layer xx" or for "\n; layer xx" as shown in the examples I linked, then the search WILL match the line, even though there is Z= information appended.

Please take another look at the thread I linked. The instructions in the that thread (viewtopic.php?f=9&t=3455) show how to do this, and wild card searching is NOT needed for it to work. The examples in that thread DO work. The key is matching on the beginning of the line (i.e., "\n ;Layer xx" ) which eliminates the need for a wild card. Matches work on partial lines, you do NOT have to match the entire line.

If this line is in the original:
; layer 49, Z = 12.225

And you use this command:
{REPLACE "\n; layer 49," "\n;***PAUSE***\nM83\nG1 E-1.0 F6000\nG91\nG1 Z5.0\nG90\nG1 X10 Y10 F6000\nM84 E0\nM0\nM82\nG92 E0\n;layer 49,"}

Then you will end up with this where that original line was at:
;***PAUSE***
M83
G1 E-1.0 F6000
G91
G1 Z5.0
G90
G1 X10 Y10 F6000
M84 E0
M0
M82
G92 E0
;layer 49, Z = 12.225
mroek
Posts: 148
Joined: Mon Oct 26, 2015 1:47 pm

Re: Pause at height?

@SimpleScott: Thanks. I see that I read that thread a bit too quickly, and your proposed solution really does work. :-)

Return to “General Discussion and Tips”