Using the <prompt>
reserved word
Use the <prompt>
reserved word to prompt the PartMaker user to enter additional information during postprocessing. You can use the information entered in several ways. For example:
- Example 1 – Using
<prompt>
to output text strings - see this page - Example 2 – Using
<prompt>
to perform calculations - see this page
<include>
reserved word.Example 1 - Using <prompt>
to output text strings
Here is a generic construction that you can create to see how prompt works:
{Enter a tool number:<prompt>1}<eob>
<if><eq-number>( <prompt>,1)<THEN>
TOOL-IS-ONE<eob>
<endif>
<ifnot><eq-number>( <prompt>,1)<then>
TOOL-IS-LARGER-THAN-ONE<eob>
<endif>
Using this construction, you will be prompted with the dialog below when generating an NC Program with a Post file including this construction:
If you enter 1 at the prompt, you will see the following in your G-code output: TOOL-IS-ONE
.
If you input something other than 1 at the prompt, you will see the following in your G-code output: TOOL-IS-LARGER-THAN-ONE
.
Example 2 - Using <prompt>
to perform calculations
This example is a construction used to configure a bar puller. Notice how the value given to prompt is passed to a variable that is then used later in a mathematical calculation.
{Please enter the puller grip length: <prompt>0.5}<eob>
~<var-3><prompt><eob>
G1 G98 Z-[<part-length>+<cut-off-width>+<var-3>] F100. <EOB>