11/07/2019
Hello,
I updated the BuildModel.bat (INPUT=.\DemoModel, and %INPUT% instead of %CVSINPUT%) so that it reflects the correct path to the files. Here it is
@ECHO off
SETLOCALset MODELCOMPILER=..\..\build\bin\Release
et6.0\Opc.Ua.ModelCompiler.exe
set MODEL=DemoModel
set VERSION=v105
set EXCLUDE=Draft
set INPUT=.\DemoModel
set OUTPUT=.
set USEALLOWSUBTYPES=-useAllowSubtypesECHO Building Model %MODEL%
ECHO %MODELCOMPILER% compile -version %VERSION% -exclude %EXCLUDE% -d2 "%INPUT%\%MODEL%.xml" -cg "%INPUT%\%MODEL%.csv" -o2 "%OUTPUT%" %USEALLOWSUBTYPES%
%MODELCOMPILER% compile -version %VERSION% -exclude %EXCLUDE% -d2 "%INPUT%\%MODEL%.xml" -cg "%INPUT%\%MODEL%.csv" -o2 "%OUTPUT%" %USEALLOWSUBTYPES%
IF %ERRORLEVEL% NEQ 0 ( ECHO Failed %MODEL% & EXIT /B 3 )
However when I am running the bat file. It is giving me the following error:
Building Model DemoModel
..\..\build\bin\Release
et6.0\Opc.Ua.ModelCompiler.exe compile -version v105 -exclude Draft -d2 ".\DemoModel\DemoModel.xml" -cg "\DemoModel.csv" -o2 "." -useAllowSubtypes
[ArgumentException] Invalid string NodeId without namespace index ('ns=').========================
at Opc.Ua.NodeId.InternalParse(String text, Boolean namespaceSet)
at Opc.Ua.NodeId.Parse(String text)
at Opc.Ua.NodeId..ctor(String text)
at ModelCompiler.ModelCompilerValidator.AddMethodArguments(MethodDesign method) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelDesignerValidator.cs:line 1549
at ModelCompiler.ModelCompilerValidator.ValidateDictionary(ModelDesign dictionary) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelDesignerValidator.cs:line 714
at ModelCompiler.ModelCompilerValidator.LoadBuiltInModel() in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelDesignerValidator.cs:line 163
at ModelCompiler.ModelCompilerValidator.ValidateModel(IList`1 designFilePaths, String identifierFilePath, Boolean generateIds) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelDesignerValidator.cs:line 1379
at ModelCompiler.ModelCompilerValidator.Validate(IList`1 designFilePaths, String identifierFilePath, Boolean generateIds) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelDesignerValidator.cs:line 1101
at ModelCompiler.ModelGenerator2.ValidateAndUpdateIds(IList`1 designFilePaths, String identifierFilePath, UInt32 startId, String specificationVersion, Boolean useAllowSubtypes, IList`1 exclusions, String modelVersion, String modelPublicationDate, Boolean releaseCandidate, Boolean extractIdentifiers) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelGenerator2.cs:line 118
at ModelCompiler.ModelCompilerApplication.<>c__DisplayClass13_0.b__0() in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelCompilerApplication.cs:line 480
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass143_0.b__0(CancellationToken _)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at ModelCompiler.ModelCompilerApplication.Run(String[] args) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelCompilerApplication.cs:line 31
at Program.$(String[] args) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\Program.cs:line 167
========================
Failed DemoModel
05/30/2017
It runs fine for me.
set MODELCOMPILER=..\..\..\build\bin\Release et6.0\Opc.Ua.ModelCompiler.exe set MODEL=DemoModel set VERSION=v105 set EXCLUDE=Draft set INPUT=. set CSVINPUT=. set OUTPUT=. set USEALLOWSUBTYPES=-useAllowSubtypes cd UA-ModelCompiler\Tests\DemoModel\DemoModel ..\BuildModel.bat
1 Guest(s)