How to change default coordinate system?

More
13 Jan 2018 18:08 #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 :
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 or Create an account to join the conversation.

More
17 Jan 2018 23:01 #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 or Create an account to join the conversation.

Time to create page: 0.088 seconds
Powered by Kunena Forum