How to change default coordinate system?

More
8 years 9 months ago #104392 by developer
Hi
I want change default coordinate system at startup - for example by edit value of "5220" number parameter in .var parameter file. I write these python codes in GUI :
Code:
varfile = open(os.getcwd() + '/' + ini_file.get('RS274NGC','PARAMETER_FILE') + '.bak', 'r') vardata = varfile.read() varfile.close() varfile = open(os.getcwd() + '/' + ini_file.get('RS274NGC','PARAMETER_FILE') + '.bak', 'w') vardata = vardata.replace('5220 1.0', '5220 9.0') #print vardata varfile.write(vardata) varfile.close() varfile = open(os.getcwd() + '/' + ini_file.get('RS274NGC','PARAMETER_FILE'), 'w') vardata = vardata.replace('5220 1.0', '5220 9.0') #print vardata varfile.write(vardata) varfile.close()
parameter files (.var and .var.bak) temporarily changes but actually value of "5220" variable remained equal 1.0.
Anyone has an idea?

Please Log in to join the conversation.

More
8 years 9 months ago #104649 by BigJohnT
The proper way to setup the environment is with a proper preamble in each and every G code file... otherwise you might get a surprise one day. Of course you can put a start up G code in the ini file in the [RS274NGC] Section.

JT

Please Log in to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum