When I run a work item on the DA, I get the following reporting:
[07/24/2019 17:50:39] InventorCoreConsole.exe Information: 0 : Loading plug-in: iLogic Plugin
[07/24/2019 17:50:39] InventorCoreConsole.exe Information: 0 : Activating plug-in: iLogic Plugin
[07/24/2019 17:50:41] iLogic Plugin: initializing...
[07/24/2019 17:50:43] Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
[07/24/2019 17:50:43] InventorCoreConsole.exe Information: 0 : Opening document: T:\Aces\Jobs\66472a1ecb0f4612a610127e9e0ee497\Jet_Engine_Model.zip
[07/24/2019 17:50:43]
[07/24/2019 17:50:43] The process 1788 ended.
[07/24/2019 17:50:43] Process exit code: -1
[07/24/2019 17:50:44]
[07/24/2019 17:50:44] End Inventor Core Engine standard output dump.
[07/24/2019 17:50:44] Error: InventorCoreConsole.exe exits with code -1 which indicates an error.
[07/24/2019 17:50:44] End script phase.
[07/24/2019 17:50:44] Error: An unexpected error happened during phase CoreEngineExecution of job.
Usually, the error occurs after opening the zip file. I'm wondering if I'm specifying inputs incorrectly, or if the server is crashing because it's trying to run the iLogic plugin?
The following are the activity specs. Zip file is specified for input and output.
Activity activitySpec = new Activity()
{
Id = activityName,
Appbundles = new List<string>() { string.Format("{0}.{1}+{2}", NickName, appBundleName, Alias) },
CommandLine = new List<string>() { commandLine },
Engine = engineName,
Parameters = new Dictionary<string, Parameter>()
{
{ "inputFile", new Parameter() { Description = "input file", LocalName = "Jet_Engine_Model.zip", Ondemand = false, Required = true, Verb = Verb.Get, Zip = true } },
{ "inputJson", new Parameter() { Description = "input json", LocalName = "params.json", Ondemand = false, Required = false, Verb = Verb.Get, Zip = false } },
{ "outputFile", new Parameter() { Description = "output file", LocalName = "Jet_Engine_Model.zip", Ondemand = false, Required = true, Verb = Verb.Put, Zip = true } }
},
Settings = new Dictionary<string, ISetting>()
{
{ "script", new StringSetting(){ Value = engineAttributes.script } }
}
};
These are the workitem parameters. Are there any items that should be specified missing?
XrefTreeArgument inputFileArgument = new XrefTreeArgument()
{
Verb = Verb.Get,
Url = string.Format("https://developer.api.autodesk.com/oss/v2/buckets/{0}/objects/{1}", bucketKey, "Jet_Engine_Model.zip"),
Headers = new Dictionary<string, string>(){{ "Authorization", "Bearer " + oauth.access_token }}};
// 2. input json
dynamic inputJson = new JObject();
inputJson.length = lengthParam;
inputJson.numberOfFairings = fairingsParam;
XrefTreeArgument inputJsonArgument = new XrefTreeArgument(){
Verb = Verb.Get,
Url = "data:application/json, " + ((JObject)inputJson).ToString(Formatting.None).Replace("\"", "'")};
// 3. output file
//string outputFileNameOSS = string.Format("{0}_output_{1}",
DateTime.Now.ToString("yyyyMMddhhmmss"),
Path.GetFileName(input.inputFile.FileName)); // avoid overriding
XrefTreeArgument outputFileArgument = new XrefTreeArgument(){
Url = string.Format("https://developer.api.autodesk.com/oss/v2/buckets/{0}/objects/{1}", bucketKey, "Jet_Engine_Model.zip"),
Verb = Verb.Put,
Headers = new Dictionary<string, string>(){{"Authorization", "Bearer " + oauth.access_token }}};
Thanks for your command line. If I understand correctly you are trying to send zipped file which you would like to have unzipped before opening one of contained file in Inventor. In that case you have to specify name of contained file (because zip can contains more than one file). You can choose name of the file by adding attribute PathInZip to your inputFile argument in WorkItem definition. Like this:
XrefTreeArgument inputFileArgument = new XrefTreeArgument()
{
Verb = Verb.Get,
Url = string.Format("https://developer.api.autodesk.com/oss/v2/buckets/{0}/objects/{1}", bucketKey, "Jet_Engine_Model.zip"),
Headers = new Dictionary<string, string>(){{ "Authorization", "Bearer " + oauth.access_token }},
PathInZip = "FileNameInsideZip.ipt"
};
User contributions licensed under CC BY-SA 3.0