Reworked PropertyUnitData.xml causes errors
Description
Attachments
Activity
Ian McNicoll January 29, 2019 at 3:15 PM
I think this can be closed .esp as AE is unlikely to be used in future.
Silje Ljosland Bakke January 11, 2016 at 11:23 AM
I'm glad you found the immediate problem Ian. Should this issue ble closed then? Could you add another for changing the way AE uses text and UCUM?
Ian McNicoll January 9, 2016 at 8:49 AM
ok - I have found and fixed the problem locally, so that the updated properties xml file now loads ok. The problem was a mixture of an actual duplicate value in the xml file and some weirdness in the way that VB was handling multiple column indexing.
So that is the good news ...
The bad news is that as it stands VB still uses the Text, rather than the UCUM value to populate the archetype. It is trivial to make it use the UCUM unit instead, but this is then what will be shown when the archetype is reloaded. It will take a bit longer to figure out how to store the UCUM unit but display the Text.
Silje Ljosland Bakke January 8, 2016 at 6:37 PM
I've previously communicated with Richard Satur of Ocean Informatics about this error.
I've made a reworked PropertyUnitData.xml to correct several wrong symbols used for basic units (f.ex "gram" is given as "gm", which actually means "gram-meter"; a unit of energy, instead of the correct "g"), and adding UCUM notation for all units. However, the Archetype Editor won't accept the file, giving an error when adding a Quantity element:
System.ArgumentException: The given name 'Property' matches at least two names in the collection object with different namespaces.
at System.Data.DataTableCollection.get_Item(String name)
at ArchetypeEditor.Main.get_PhysicalPropertiesTable()
at ArchetypeEditor.QuantityConstraintControl.SetControlValues(Boolean isState)
at ArchetypeEditor.ConstraintControl.ShowConstraint(Boolean isState, Constraint c)
at ArchetypeEditor.ArchetypeNodeConstraintControl.ShowConstraint(Boolean isSingle, Boolean isState, Boolean isMandatory, ArchetypeNode node, FileManagerLocal fileManager)
at ArchetypeEditor.TabPageStructure.ShowDetailPanel(ArchetypeNode node, EventArgs e)
at ArchetypeEditor.EntryStructure.SetCurrentItem(ArchetypeNode node)
at ArchetypeEditor.TreeStructure.tvTree_AfterSelect(Object sender, TreeViewEventArgs e)
Attaching a screenshot showing the error message, and the new PropertyUnitData.xml file.