05/19/2021
Hi,
I am trying to create custom information models, where some common definitions of types are implemented in a "BaseDefintions.xml" model design file, and other model design files use and extend these definitions. But I am struggling to find out how to reference the BaseDefinitions.xml file.
I have looked at some examples from GitHub - OPCFoundation/UA-.NETStandard-Samples , and the Workshop/DataTypes/Server/Instances/ModelDesign2.xml seems to implement what I am trying to achieve, by referencing Workshop/DataTypes/Common/Types/ModelDesign1.xml with the "FilePath" attribute in the Namespace element. But even running Workshop/DataTypes/Server/BuildDesign.bat fails with the following error message:
Building ModelDesign2
Version: 2.3.0.0
FileVersion: 2.3.2411.1944
Opc.Ua.Core: Opc.Ua.Core, Version=1.5.371.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8
[InvalidOperationException] The BaseType reference for node TwoWheelerType is not valid: VehicleType.
Have someone successfully run these examples?
I have also not yet found any documentation regarding the ModelDesign/Model Compiler, other than what is inside the UAModelDesign.xsd file and from calling the Model Compiler with the --help argument. More specifically I am looking for information describing how the Model Compiler validates the namespaces and what xml elements/attributes needs to correspond between Model Design files to be able to use definitions from one file in another file.Some examples have multiple -d2 arguments in the compile statement, others use the "FilePath" attribute in the namespace definitions inside the ModelDesign file. What is the correct way to use definitions from other files?
1 Guest(s)