Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Post Variable for checking inch/Metric


Mike Mattera - TFM
 Share

Recommended Posts

So I'm using the met_tool$ to check for Inch/Metric. I have created this conditional...

 

*met_tool$, e$ #returns 0 for inch, 1 for mm

if *met_tool$ = 1, pbld, n$, "Z75.", e$

if *met_tool$ = 0, pbld, n$, "Z3.", e$

 

Both lines are output. This is the output...

 

met_tool$ 1. (I'm in a metric program)

Z75.

Z3.

 

Any suggestions how to control these for In/mm conditions?

 

Mike Mattera

Link to comment
Share on other sites

Hi Mike,

 

The astrix symbol is a "Force variable output" modifer. I don't think you can use it in a boolean "if" statement.

 

Try

 

if met_tool$ = 1, pbld, n$, "Z75.", e$

if met_tool$ = 0, pbld, n$, "Z3.", e$

 

Since the value of the met_tool$ variable will always be a 0 or a 1, you could also use an if,else statement:

 

if met_tool$ = 1, pbld, n$, "Z75.", e$

else, pbld, n$, "Z3.", e$

 

HTH,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...