Index: /issm/trunk-jpl/src/c/classes/IoModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/IoModel.cpp	(revision 20968)
+++ /issm/trunk-jpl/src/c/classes/IoModel.cpp	(revision 20969)
@@ -193,7 +193,8 @@
 	this->my_vertices = NULL;
 
-	FetchData(&this->domaintype,"md.mesh.domain_type");
+	FindConstant(&this->domaintype,"md.mesh.domain_type");
+	FindConstant(&this->meshelementtype,"md.mesh.elementtype");
+
 	FetchData(&this->domaindim,"md.mesh.domain_dimension");
-	FetchData(&this->meshelementtype,"md.mesh.elementtype");
 	FetchData(&this->numberofvertices,"md.mesh.numberofvertices");
 	FetchData(&this->numberofelements,"md.mesh.numberofelements");
@@ -344,5 +345,4 @@
 				break;
 			}
-			//_printf_("   reading "<< record_name<<"...\n");
 			if(strncmp(record_name,mddot,3)!=0){
 				_error_("error while reading binary file: record does not start with \"md.\": "<<record_name);
@@ -569,5 +569,4 @@
 				_error_("error while reading binary file: record does not start with \"md.\": "<<record_name);
 			}
-			//_printf_("reading "<<record_name<<"...\n");
 
 			/* Read the record length and the data type code: */
@@ -596,5 +595,5 @@
 					/*Read the integer and broadcast it to other cpus:*/
 					if(fread(&integer,sizeof(int),1,this->fid)!=1) _error_("could not read integer ");
-
+					
 					/*Convert codes to Enums if needed*/
 					if(strcmp(record_name,"md.smb.model")==0) integer = IoCodeToEnumSMB(integer);
@@ -662,4 +661,10 @@
 						this->AddConstant(new IoConstant(StringToEnumx(string),record_name));
 					} else if(strcmp(record_name,"md.materials.rheology_law")==0){
+						this->AddConstant(new IoConstant(StringToEnumx(string),record_name));
+					} else if(strcmp(record_name,"md.damage.elementinterp")==0){
+						this->AddConstant(new IoConstant(StringToEnumx(string),record_name));
+					} else if(strcmp(record_name,"md.mesh.domain_type")==0){
+						this->AddConstant(new IoConstant(StringToEnumx(string),record_name));
+					} else if(strcmp(record_name,"md.mesh.elementtype")==0){
 						this->AddConstant(new IoConstant(StringToEnumx(string),record_name));
 					} else {
@@ -784,4 +789,5 @@
 							string[0]='\0';
 						}
+
 						if(strcmp(record_name,"md.flowequation.fe_SSA")==0){
 							this->AddConstant(new IoConstant(StringToEnumx(string),record_name));
@@ -795,4 +801,10 @@
 							this->AddConstant(new IoConstant(StringToEnumx(string),record_name));
 						} else if(strcmp(record_name,"md.materials.rheology_law")==0){
+							this->AddConstant(new IoConstant(StringToEnumx(string),record_name));
+						} else if(strcmp(record_name,"md.damage.elementinterp")==0){
+							this->AddConstant(new IoConstant(StringToEnumx(string),record_name));
+						} else if(strcmp(record_name,"md.mesh.domain_type")==0){
+							this->AddConstant(new IoConstant(StringToEnumx(string),record_name));
+						} else if(strcmp(record_name,"md.mesh.elementtype")==0){
 							this->AddConstant(new IoConstant(StringToEnumx(string),record_name));
 						} else {
@@ -933,5 +945,5 @@
 	/*recover my_rank:*/
 	int my_rank=IssmComm::GetRank();
-
+	
 	/*Set file pointer to beginning of the data: */
 	fid=this->SetFilePointerToData(&code,NULL,data_name);
Index: /issm/trunk-jpl/src/m/classes/damage.js
===================================================================
--- /issm/trunk-jpl/src/m/classes/damage.js	(revision 20968)
+++ /issm/trunk-jpl/src/m/classes/damage.js	(revision 20969)
@@ -108,5 +108,5 @@
 				WriteData(fid,prefix,'object',this,'fieldname','stabilization','format','Integer');
 				WriteData(fid,prefix,'object',this,'fieldname','maxiter','format','Integer');
-				WriteData(fid,prefix,'name','md.damage.elementinterp','data',StringToEnum(this.elementinterp),'format','Integer');
+				WriteData(fid,prefix,'name','md.damage.elementinterp','data',this.elementinterp,'format','String');
 				WriteData(fid,prefix,'object',this,'fieldname','stress_threshold','format','Double');
 				WriteData(fid,prefix,'object',this,'fieldname','kappa','format','Double');
Index: /issm/trunk-jpl/src/m/classes/damage.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/damage.m	(revision 20968)
+++ /issm/trunk-jpl/src/m/classes/damage.m	(revision 20969)
@@ -154,5 +154,5 @@
 				WriteData(fid,prefix,'object',self,'fieldname','stabilization','format','Integer');
 				WriteData(fid,prefix,'object',self,'fieldname','maxiter','format','Integer');
-				WriteData(fid,prefix,'name','md.damage.elementinterp','data',StringToEnum(self.elementinterp),'format','Integer');
+				WriteData(fid,prefix,'name','md.damage.elementinterp','data',self.elementinterp,'format','String');
 				WriteData(fid,prefix,'object',self,'fieldname','stress_threshold','format','Double');
 				WriteData(fid,prefix,'object',self,'fieldname','kappa','format','Double');
Index: /issm/trunk-jpl/src/m/classes/damage.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/damage.py	(revision 20968)
+++ /issm/trunk-jpl/src/m/classes/damage.py	(revision 20969)
@@ -155,5 +155,5 @@
 			WriteData(fid,prefix,'object',self,'fieldname','stabilization','format','Integer')
 			WriteData(fid,prefix,'object',self,'fieldname','maxiter','format','Integer')
-			WriteData(fid,prefix,'name','md.damage.elementinterp','data',StringToEnum(self.elementinterp)[0],'format','Integer')
+			WriteData(fid,prefix,'name','md.damage.elementinterp','data',self.elementinterp,'format','String')
 			WriteData(fid,prefix,'object',self,'fieldname','stress_threshold','format','Double')
 			WriteData(fid,prefix,'object',self,'fieldname','kappa','format','Double')
Index: /issm/trunk-jpl/src/m/classes/mesh2d.js
===================================================================
--- /issm/trunk-jpl/src/m/classes/mesh2d.js	(revision 20968)
+++ /issm/trunk-jpl/src/m/classes/mesh2d.js	(revision 20969)
@@ -80,7 +80,7 @@
 		} // }}}
 		this.marshall=function(md,prefix,fid) { //{{{
-			WriteData(fid,prefix,'name','md.mesh.domain_type','data',StringToEnum('Domain' + this.domaintype()),'format','Integer');
+			WriteData(fid,prefix,'name','md.mesh.domain_type','data','Domain' + this.domaintype(),'format','String');
 			WriteData(fid,prefix,'name','md.mesh.domain_dimension','data',this.dimension(),'format','Integer');
-			WriteData(fid,prefix,'name','md.mesh.elementtype','data',StringToEnum(this.elementtype()),'format','Integer');
+			WriteData(fid,prefix,'name','md.mesh.elementtype','data',this.elementtype(),'format','String');
 			WriteData(fid,prefix,'object',this,'class','mesh','fieldname','x','format','DoubleMat','mattype',1);
 			WriteData(fid,prefix,'object',this,'class','mesh','fieldname','y','format','DoubleMat','mattype',1);
Index: /issm/trunk-jpl/src/m/classes/mesh2d.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/mesh2d.m	(revision 20968)
+++ /issm/trunk-jpl/src/m/classes/mesh2d.m	(revision 20969)
@@ -128,7 +128,7 @@
 		end % }}}
 		function marshall(self,prefix,md,fid) % {{{
-			WriteData(fid,prefix,'name','md.mesh.domain_type','data',StringToEnum(['Domain' domaintype(self)]),'format','Integer');
+			WriteData(fid,prefix,'name','md.mesh.domain_type','data',['Domain' domaintype(self)],'format','String');
 			WriteData(fid,prefix,'name','md.mesh.domain_dimension','data',dimension(self),'format','Integer');
-			WriteData(fid,prefix,'name','md.mesh.elementtype','data',StringToEnum(elementtype(self)),'format','Integer');
+			WriteData(fid,prefix,'name','md.mesh.elementtype','data',elementtype(self),'format','String');
 			WriteData(fid,prefix,'object',self,'class','mesh','fieldname','x','format','DoubleMat','mattype',1);
 			WriteData(fid,prefix,'object',self,'class','mesh','fieldname','y','format','DoubleMat','mattype',1);
Index: /issm/trunk-jpl/src/m/classes/mesh2d.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/mesh2d.py	(revision 20968)
+++ /issm/trunk-jpl/src/m/classes/mesh2d.py	(revision 20969)
@@ -108,7 +108,7 @@
 	#}}}
 	def marshall(self,prefix,md,fid):    # {{{
-		WriteData(fid,prefix,'name','md.mesh.domain_type','data',StringToEnum("Domain"+self.domaintype())[0],'format','Integer');
+		WriteData(fid,prefix,'name','md.mesh.domain_type','data',"Domain"+self.domaintype(),'format','String');
 		WriteData(fid,prefix,'name','md.mesh.domain_dimension','data',self.dimension(),'format','Integer');
-		WriteData(fid,prefix,'name','md.mesh.elementtype','data',StringToEnum(self.elementtype())[0],'format','Integer');
+		WriteData(fid,prefix,'name','md.mesh.elementtype','data',self.elementtype(),'format','String');
 		WriteData(fid,prefix,'object',self,'class','mesh','fieldname','x','format','DoubleMat','mattype',1)
 		WriteData(fid,prefix,'object',self,'class','mesh','fieldname','y','format','DoubleMat','mattype',1)
