Share

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
Tip: If you want the information entered by the PartMaker user to be included in the NC Program file exactly as the user entered it, use the <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:

image

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.

Note: PartMaker prompts the user to enter additional information during postprocessing only if the Stop to Include User Input option is selected in the Post Options dialog.

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>
Note: PartMaker prompts the user to enter additional information during postprocessing only if the Stop to Include User Input option is selected in the Post Options dialog.

Was this information helpful?