Index: cpp/frams/genetics/genman.cpp
===================================================================
--- cpp/frams/genetics/genman.cpp	(revision 986)
+++ cpp/frams/genetics/genman.cpp	(revision 988)
@@ -289,5 +289,5 @@
 	GenoOperators *gf = getOper_f(format);
 	if (gf == NULL)
-		return Geno("", Geno::INVALID_FORMAT, "", SString::sprintf("GENOPER_NOOPER: Validate(): don't know how to handle genetic format %s", format.c_str()));
+		return Geno("", Geno::FORMAT_INVALID, "", SString::sprintf("GENOPER_NOOPER: Validate(): don't know how to handle genetic format %s", format.c_str()));
 	char *g2 = strdup(geny.getGenes().c_str()); //copy for validation
 	int res = gf->validate(g2, geny.getName().c_str());
@@ -297,5 +297,5 @@
 		return Geno(sg2, format, geny.getName(), geny.getComment());
 	else
-		return Geno("", Geno::INVALID_FORMAT, "", SString::sprintf("GENOPER_NOOPER: validate() for format %s returned invalid value", format.c_str()));
+		return Geno("", Geno::FORMAT_INVALID, "", SString::sprintf("GENOPER_NOOPER: validate() for format %s returned invalid value", format.c_str()));
 }
 
@@ -307,9 +307,9 @@
 	GenoOperators *gf = getOper_f(format);
 	if (gf == NULL)
-		return Geno("", Geno::INVALID_FORMAT, "", SString::sprintf("GENOPER_NOOPER: Mutate(): don't know how to handle genetic format %s", format.c_str()));
+		return Geno("", Geno::FORMAT_INVALID, "", SString::sprintf("GENOPER_NOOPER: Mutate(): don't know how to handle genetic format %s", format.c_str()));
 	Geno gv = g;
 	bool canvalidate = true;
 	if (testValidity(gv, canvalidate) > 0 && canvalidate == false)
-		return Geno("", Geno::INVALID_FORMAT, "", "GENOPER_OPFAIL: Mutate(): cannot validate invalid source genotype");
+		return Geno("", Geno::FORMAT_INVALID, "", "GENOPER_OPFAIL: Mutate(): cannot validate invalid source genotype");
 	bool ok = false;
 	int pcount = count;
@@ -354,8 +354,8 @@
 {
 	SString format = g1.getFormat();
-	if (format != g2.getFormat()) return Geno("", Geno::INVALID_FORMAT, "", SString::sprintf("GENOPER_NOOPER: CrossOver(): does not work for parents with differing genetic formats (%s and %s)", format.c_str(), g2.getFormat().c_str()));
+	if (format != g2.getFormat()) return Geno("", Geno::FORMAT_INVALID, "", SString::sprintf("GENOPER_NOOPER: CrossOver(): does not work for parents with differing genetic formats (%s and %s)", format.c_str(), g2.getFormat().c_str()));
 	GenoOperators *gf = getOper_f(format);
 	if (gf == NULL)
-		return Geno("", Geno::INVALID_FORMAT, "", SString::sprintf("GENOPER_NOOPER: CrossOver(): no operators found for genetic format %s", format.c_str()));
+		return Geno("", Geno::FORMAT_INVALID, "", SString::sprintf("GENOPER_NOOPER: CrossOver(): no operators found for genetic format %s", format.c_str()));
 	Geno g1v = g1, g2v = g2;
 
@@ -364,8 +364,8 @@
 		bool canvalidate = true;
 		if (testValidity(g1v, canvalidate) > 0 && canvalidate == false)
-			return Geno("", Geno::INVALID_FORMAT, "", "GENOPER_OPFAIL: CrossOver(): cannot validate invalid source genotype #1");
+			return Geno("", Geno::FORMAT_INVALID, "", "GENOPER_OPFAIL: CrossOver(): cannot validate invalid source genotype #1");
 		canvalidate = true;
 		if (testValidity(g2v, canvalidate) > 0 && canvalidate == false)
-			return Geno("", Geno::INVALID_FORMAT, "", "GENOPER_OPFAIL: CrossOver(): cannot validate invalid source genotype #2");
+			return Geno("", Geno::FORMAT_INVALID, "", "GENOPER_OPFAIL: CrossOver(): cannot validate invalid source genotype #2");
 	}
 
@@ -405,5 +405,5 @@
 		{
 			logPrintf("GenMan", "CrossOver", LOG_WARN, "Tried " GENMAN_REPEAT_FAILED_STR "x and failed: %s and %s", g1.getGenes().c_str(), g2.getGenes().c_str());
-			return Geno("", Geno::INVALID_FORMAT, "", "GENOPER_OPFAIL: CrossOver() tried " GENMAN_REPEAT_FAILED_STR "x and failed");
+			return Geno("", Geno::FORMAT_INVALID, "", "GENOPER_OPFAIL: CrossOver() tried " GENMAN_REPEAT_FAILED_STR "x and failed");
 		}
 	}
@@ -428,5 +428,5 @@
 {
 	SString format = G->getFormat();
-	if (format == Geno::INVALID_FORMAT)
+	if (format == Geno::FORMAT_INVALID)
 		return GENSTYLE_RGBS(64, 64, 64, 0); // gray & "valid" (unknown format so we don't know what is valid and what is not)
 	if ((pos = G->mapStringToGen(pos)) == -1) return GENSTYLE_COMMENT;
@@ -445,5 +445,5 @@
 {
 	SString format = G->getFormat();
-	if (format == Geno::INVALID_FORMAT)
+	if (format == Geno::FORMAT_INVALID)
 	{
 		for (unsigned int pos = 0; pos < strlen(g); pos++)
Index: cpp/frams/genetics/geno.cpp
===================================================================
--- cpp/frams/genetics/geno.cpp	(revision 986)
+++ cpp/frams/genetics/geno.cpp	(revision 988)
@@ -38,6 +38,6 @@
 }
 
-const SString Geno::INVALID_FORMAT = "invalid";
-const SString Geno::UNKNOWN_FORMAT = "";
+const SString Geno::FORMAT_INVALID = "invalid";
+const SString Geno::FORMAT_UNKNOWN = "";
 const SString Geno::F0_FORMAT_LIST = "0,0s";
 
@@ -68,5 +68,5 @@
 	SString format = trim(input);
 	if (format.length() == 0 || strContainsOneOf(format.c_str(), " \r\n\t"))
-		return Geno::INVALID_FORMAT;
+		return Geno::FORMAT_INVALID;
 	return format;
 }
@@ -78,5 +78,5 @@
 	SString gencopy(genstring);
 	SString genformat = in_genformat;
-	if (genformat == UNKNOWN_FORMAT)
+	if (genformat == FORMAT_UNKNOWN)
 	{ // unknown format
 		genformat = "1";
@@ -118,5 +118,5 @@
 				break;
 			}
-			if (genformat == INVALID_FORMAT)
+			if (genformat == FORMAT_INVALID)
 			{
 				SString cut;
@@ -191,5 +191,5 @@
 Geno::Geno(const SString& src)
 {
-	init(src, UNKNOWN_FORMAT, SString::empty(), SString::empty());
+	init(src, FORMAT_UNKNOWN, SString::empty(), SString::empty());
 }
 
@@ -204,5 +204,5 @@
 {
 	freeF0();
-	init(g, UNKNOWN_FORMAT, SString::empty(), SString::empty());
+	init(g, FORMAT_UNKNOWN, SString::empty(), SString::empty());
 }
 
@@ -277,5 +277,5 @@
 	if (isvalid >= 0) return;
 	if (gen.length() == 0) { isvalid = 0; return; }
-	if (format == INVALID_FORMAT) { isvalid = 0; return; }
+	if (format == FORMAT_INVALID) { isvalid = 0; return; }
 	Validators* vals = getValidators();
 	if (vals != NULL)
Index: cpp/frams/genetics/geno.h
===================================================================
--- cpp/frams/genetics/geno.h	(revision 986)
+++ cpp/frams/genetics/geno.h	(revision 988)
@@ -55,6 +55,6 @@
 
 public:
-	static const SString INVALID_FORMAT;
-	static const SString UNKNOWN_FORMAT;
+	static const SString FORMAT_INVALID;
+	static const SString FORMAT_UNKNOWN;
 	typedef SListTempl<GenoValidator*> Validators;
 
@@ -93,5 +93,5 @@
 
 	/** @param genformat="" -> detect genotype format from genstring comment (like the constructor does), else specify the valid format in genformat and pure genes in genstring. */
-	void setGenesAndFormat(const SString& genstring, const SString& genformat = UNKNOWN_FORMAT);
+	void setGenesAndFormat(const SString& genstring, const SString& genformat = FORMAT_UNKNOWN);
 	/** g must be pure genes, without format. For the standard behavior use setGenesAndFormat() */
 	void setGenesAssumingSameFormat(const SString& g);
Index: cpp/frams/genetics/genoconv.cpp
===================================================================
--- cpp/frams/genetics/genoconv.cpp	(revision 986)
+++ cpp/frams/genetics/genoconv.cpp	(revision 988)
@@ -107,6 +107,6 @@
 	for (; gk = (GenoConverter*)converters(i); i++)
 	{
-		if ((in != Geno::UNKNOWN_FORMAT) && (in != gk->in_format)) continue;
-		if ((out != Geno::UNKNOWN_FORMAT) && (out != gk->out_format)) continue;
+		if ((in != Geno::FORMAT_UNKNOWN) && (in != gk->in_format)) continue;
+		if ((out != Geno::FORMAT_UNKNOWN) && (out != gk->out_format)) continue;
 		if ((enabled != -1) && (enabled != gk->enabled)) continue;
 		if ((name) && (strcmp(name, gk->name))) continue;
@@ -168,5 +168,5 @@
 	{
 		if (converter_missing) *converter_missing = false;
-		return Geno("", Geno::INVALID_FORMAT, "", "Invalid genotype cannot be converted");
+		return Geno("", Geno::FORMAT_INVALID, "", "Invalid genotype cannot be converted");
 	}
 	int mapavail;
@@ -176,5 +176,5 @@
 	{
 		if (converter_missing) *converter_missing = true;
-		return Geno("", Geno::INVALID_FORMAT, "", "Converter not found");
+		return Geno("", Geno::FORMAT_INVALID, "", "Converter not found");
 	}
 	if (converter_missing) *converter_missing = false;
@@ -193,5 +193,5 @@
 		{
 			string t = ssprintf("f%s->f%s conversion failed (%s)", gk->in_format.c_str(), gk->out_format.c_str(), gk->name);
-			return Geno("", Geno::INVALID_FORMAT, "", t.c_str());
+			return Geno("", Geno::FORMAT_INVALID, "", t.c_str());
 		}
 		if (mapavail)
Index: cpp/frams/genetics/genoconv.h
===================================================================
--- cpp/frams/genetics/genoconv.h	(revision 986)
+++ cpp/frams/genetics/genoconv.h	(revision 988)
@@ -56,5 +56,5 @@
 	virtual ~GenoConverter() {}
 	/// Don't forget to set public fields in your constructor
-	GenoConverter() :name(""), in_format(Geno::UNKNOWN_FORMAT), out_format("0"), enabled(1), mapsupport(0) {}
+	GenoConverter() :name(""), in_format(Geno::FORMAT_UNKNOWN), out_format("0"), enabled(1), mapsupport(0) {}
 };
 
@@ -87,5 +87,5 @@
 	/// pass result=0 if you only need one result (by return value)
 	/// default criteria values mean "don't care", pass anything else to narrow your search
-	GenoConverter *findConverters(SListTempl<GenoConverter*>* result = 0, const SString& in = Geno::UNKNOWN_FORMAT, const SString& out = Geno::UNKNOWN_FORMAT, int enabled = -1, char* name = 0);
+	GenoConverter *findConverters(SListTempl<GenoConverter*>* result = 0, const SString& in = Geno::FORMAT_UNKNOWN, const SString& out = Geno::FORMAT_UNKNOWN, int enabled = -1, char* name = 0);
 };
 
Index: cpp/frams/model/model.cpp
===================================================================
--- cpp/frams/model/model.cpp	(revision 986)
+++ cpp/frams/model/model.cpp	(revision 988)
@@ -351,4 +351,6 @@
 		return;
 	}
+	if (declared_shape == SHAPE_UNKNOWN)
+		declareShapeType(shapeTypeForGenoFormat(f0geno.getFormat()));
 	SString f0txt = f0geno.getGenes();
 	buildstatus = building; // was: open();
@@ -447,5 +449,5 @@
 	if ((buildstatus != valid) && (buildstatus != building))
 	{
-		g = Geno("", Geno::INVALID_FORMAT, "", "invalid model");
+		g = Geno("", Geno::FORMAT_INVALID, "", "invalid model");
 		return;
 	}
@@ -563,5 +565,5 @@
 		return "0s";
 	default:
-		return Geno::INVALID_FORMAT;
+		return Geno::FORMAT_INVALID;
 	}
 }
Index: cpp/frams/vm/classes/genoobj.cpp
===================================================================
--- cpp/frams/vm/classes/genoobj.cpp	(revision 986)
+++ cpp/frams/vm/classes/genoobj.cpp	(revision 988)
@@ -111,5 +111,5 @@
 		return v.getString();
 	}
-	return Geno::INVALID_FORMAT;
+	return Geno::FORMAT_INVALID;
 }
 
@@ -198,5 +198,5 @@
 		SString n = vec->get(1) ? vec->get(1)->getString() : SString::empty();
 		SString c = vec->get(2) ? vec->get(2)->getString() : SString::empty();
-		*ret = makeDynamicObjectAndDecRef(new Geno(g, Geno::UNKNOWN_FORMAT, n, c));
+		*ret = makeDynamicObjectAndDecRef(new Geno(g, Geno::FORMAT_UNKNOWN, n, c));
 	}
 	else
