This commit is contained in:
2021-02-12 22:03:58 +00:00
parent 0ea8b5ffe3
commit 949db18d9a

View File

@@ -35,7 +35,7 @@ namespace AyaNova.PlugIn.V8
public string PluginVersion public string PluginVersion
{ {
get { return "7.6.1-alpha.105"; } get { return "7.6.1-alpha.106"; }
} }
public string About public string About
@@ -1681,7 +1681,16 @@ namespace AyaNova.PlugIn.V8
var ObjectTID = new TypeAndID(RootObjectTypes.Unit, c.ID); var ObjectTID = new TypeAndID(RootObjectTypes.Unit, c.ID);
dynamic d = new JObject(); dynamic d = new JObject();
d.Serial = c.Serial;
string tempNumber = c.Serial;
if (string.IsNullOrWhiteSpace(tempNumber))
tempNumber = "0";//was not required in v7, is required in v8
//UNIT SERIAL NUMBER and MODEL ID combo must be unique!!
//this ensures that by appending a extra number character that is unique then removing the vendorid from the start
//resulting in a unique name/vendorid combo
d.serial = GetUniqueName(c.UnitModelID.ToString() + tempNumber).Replace(c.UnitModelID.ToString(), "");
if (IsDuplicatev7v8IdMapItem(c.ID, c.Serial, progress)) continue; if (IsDuplicatev7v8IdMapItem(c.ID, c.Serial, progress)) continue;
progress.Op(ObjectTypeName + " " + d.serial); progress.Op(ObjectTypeName + " " + d.serial);
d.active = c.Active; d.active = c.Active;