Model Compiler - combine Model Design xml files|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Model Compiler - combine Model Design xml files
Avatar
Terje Kvangardsnes
New Member
Members
Forum Posts: 1
Member Since:
05/19/2021
sp_UserOfflineSmall Offline
1
11/20/2024 - 01:42
sp_Permalink sp_Print

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?

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 17
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1434
Posts: 4854