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:

Recommended Posts

I found the RegVars_CH.h header to query the system units and change them if I want. However, this only seems to change the on screen measurement system, the working unit system. If IsNotEnglish() returns true I SetUnitsEnglish. However in the Configuration settings the units were still in metric after SetUnitsEnglish was performed.

 

I need the System configuration to change to english, and scale to english units as the system does if the drop down is selected manually. Is there some way to do this?

Link to comment
Share on other sites

Thanks Takashi. I tried that guy too. Except somehow when I did it I got a dialogue box. So when I used your code here it didn't get a dialogue box, which is what I needed, so thanks for that. It also switched the setting in the Mastercam Configuration settings.

 

The only thing I can't yet figure out, the object didn't scale when it switched the settings to english. So for example, I have a 40mm wide part, but this operation made it a 40 inch part instead of a 1.57".

Link to comment
Share on other sites

I've never used these functions though,

I guess these functions will do. smile.gif

code:

 

/**

* @par Purpose:

* Checks to see if there is anything to scale, and if the user wants to

* @param[in] e2m TRUE if the entities are to be scaled to metric; FALSE if they're to be scaled to English

* @param[in] eptr The mark from which to check for scalable entities

* @param[in] b4eptr TRUE if we're to check the entities before the eptr; FALSE if we're to check the ones after

* @param[in] prmpt TRUE if the user is to be prompted as to whether or not there should be any scaling done

* @return TRUE if there are entities to be scaled

*/

DllImpExp MC_BOOL fmu_scale_yn (MC_BOOL e2m, DB_LIST_ENT_PTR eptr,

MC_BOOL b4eptr, MC_BOOL prmpt);

 

/**

* @par Purpose:

* Scales either from metric to english or from english to metric

* @param[in] e2m TRUE if the entities are to be scaled to metric; FALSE if they're to be scaled to English

* @param[in] eptr The mark from which to check for scalable entities

* @param[in] b4eptr TRUE if we're to check the entities before the eptr; FALSE if we're to check the ones after

* @param[in] prmpt TRUE if the user is to be prompted as to whether or not there should be any scaling done

*/

DllImpExp void fmu_scale_db (MC_BOOL e2m, DB_LIST_ENT_PTR eptr,

MC_BOOL b4eptr, MC_BOOL prmpt);

 

 

 

 

 

 


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...