|
41 | 41 | using UAObject = MarkdownProcessor.NodeSet.UAObject; |
42 | 42 | using UAType = MarkdownProcessor.NodeSet.UAType; |
43 | 43 | using UAVariable = MarkdownProcessor.NodeSet.UAVariable; |
| 44 | +using UAVariableType = MarkdownProcessor.NodeSet.UAVariableType; |
44 | 45 | using DataTypeField = MarkdownProcessor.NodeSet.DataTypeField; |
45 | 46 | using Aml.Engine.Adapter; |
46 | 47 | using System.Xml.Linq; |
|
53 | 54 | using System.Reflection; |
54 | 55 | using System.Xml; |
55 | 56 | using Opc2Aml; |
56 | | -using Newtonsoft.Json.Linq; |
57 | 57 |
|
58 | 58 |
|
59 | 59 | namespace MarkdownProcessor |
@@ -604,6 +604,15 @@ private void AddBaseNodeClassAttributes( AttributeSequence seq, UANode uanode) |
604 | 604 | { |
605 | 605 | AddModifyAttribute(seq, "IsAbstract", "Boolean", uaType.IsAbstract); |
606 | 606 | } |
| 607 | + |
| 608 | + UAVariableType uaVariableType = uanode as UAVariableType; |
| 609 | + if (uaVariableType != null) |
| 610 | + { |
| 611 | + if (uaVariableType.ValueRank != -1) |
| 612 | + { |
| 613 | + AddModifyAttribute(seq, "ValueRank", "Int32", uaVariableType.ValueRank); |
| 614 | + } |
| 615 | + } |
607 | 616 | } |
608 | 617 |
|
609 | 618 | private void BuildLocalizedTextAttribute( |
@@ -714,8 +723,6 @@ private AttributeType AddModifyAttribute(AttributeSequence seq, string name, str |
714 | 723 | { |
715 | 724 | if (bListOf == false && val.TypeInfo != null) // look for reasons not to add the attribute because missing == default value |
716 | 725 | { |
717 | | - if (name == "ValueRank" && val == -2 ) |
718 | | - return null; |
719 | 726 | if (name == "IsSource" && val == false) |
720 | 727 | return null; |
721 | 728 | if (name == "Symmetric" && val == false) |
|
0 commit comments