diff --git a/Opc.Ua.ModelCompiler/ModelDesignerValidator.cs b/Opc.Ua.ModelCompiler/ModelDesignerValidator.cs index f41aeef..058f841 100644 --- a/Opc.Ua.ModelCompiler/ModelDesignerValidator.cs +++ b/Opc.Ua.ModelCompiler/ModelDesignerValidator.cs @@ -5073,7 +5073,15 @@ private void BuildInstanceHierarchy2( child.StaticValue = true; } } - + + if (instance.ModellingRule == ModellingRule.OptionalPlaceholder || instance.ModellingRule == ModellingRule.MandatoryPlaceholder) + { + if (depth > 3) + { + continue; + } + } + nodes.Add(child); BuildInstanceHierarchy2(instance, browsePath, nodes, references, inherited, depth + 1); diff --git a/Opc.Ua.ModelCompiler/ModelGenerator2.cs b/Opc.Ua.ModelCompiler/ModelGenerator2.cs index 2e68e37..f33939a 100644 --- a/Opc.Ua.ModelCompiler/ModelGenerator2.cs +++ b/Opc.Ua.ModelCompiler/ModelGenerator2.cs @@ -4376,7 +4376,8 @@ private InstanceDesign GetMergedInstance(InstanceDesign instance) { "Description", "Save", - "Value" + "Handle", + "Specification" }; private bool IsIndeterminateType(InstanceDesign instance) @@ -4469,7 +4470,7 @@ private bool WriteTemplate_ListOfPropertiesForType(Template template, Context co if (!IsOverridden(instance)) { - if (!BuiltInPropertyNames.Contains(instance.SymbolicName.Name)) + if (!BuiltInPropertyNames.Contains(instance.SymbolicName.Name) || (instance is VariableDesign && instance.SymbolicName.Name == "Value")) { template.AddReplacement("public new", "public"); } diff --git a/Tests/DemoModel/BuildModel.bat b/Tests/DemoModel/BuildModel.bat index 1b0255b..6066818 100644 --- a/Tests/DemoModel/BuildModel.bat +++ b/Tests/DemoModel/BuildModel.bat @@ -6,6 +6,7 @@ set MODEL=DemoModel set VERSION=v105 set EXCLUDE=Draft set INPUT=. +set CSVINPUT=. set OUTPUT=. set USEALLOWSUBTYPES=-useAllowSubtypes