I extracted iLogicRules.json from the box_inventor.ipt file with iLogic. In it, I tried to change the defined values of d0, d1, d2, and d3 and output them as Result.ipt. I created the input00.iLogicVb file that defines the numerical values and ran Design Automation. The resulting log was successful, but none of the dimensions had changed. How can I change it?
I was able to extract iLogicRules.json from the box_inventor.ipt file that has iLogic. Below is the extracted iLogicRules.json.
{"iLogic":[{"Name":"ShowDimsForm","Text":"iLogicForm.Show(\"Main Dimensions\")\n"}],"Parameters":{"UserParam":[{"Name":"length","Value":"24 in","ExpressionList":[]},{"Name":"width","Value":"36 in","ExpressionList":[]},{"Name":"height","Value":"12 in","ExpressionList":[]},{"Name":"thickness","Value":"0.5 in","ExpressionList":[]}],"ModelParam":[{"Name":"d0","Value":"length","ExpressionList":[]},{"Name":"d1","Value":"width","ExpressionList":[]},{"Name":"d2","Value":"thickness","ExpressionList":[]},{"Name":"d3","Value":"thickness","ExpressionList":[]},{"Name":"d4","Value":"thickness","ExpressionList":[]},{"Name":"d5","Value":"thickness","ExpressionList":[]},{"Name":"d6","Value":"height","ExpressionList":[]},{"Name":"d7","Value":"0.0 deg","ExpressionList":[]},{"Name":"d8","Value":"thickness","ExpressionList":[]},{"Name":"d9","Value":"0.0 deg","ExpressionList":[]}],"TableParam":[]}}
I would like to create a Result.ipt that changes the shape by putting a value in ModelParam. Therefore, I applied the input00.iLogicVb file below using this iLogicRules.json as a reference.
Parameter("d0") = 44
Parameter("d1") = 56
Parameter("d2") = 32
Parameter("d3") = 2.5
Dim docDir As String = System.IO.Path.GetDirectoryName(ThisDoc.Document.FullFileName)
Dim fileName As String = System.IO.Path.Combine(docDir, "Result.ipt")
ThisDoc.Document.SaveAs(fileName, False)
The log that resulted from running Design Automation showed success as shown below. In the text of this log, strings related to security have been changed.
[01/30/2024 05:11:46] Job information:
{
"CommandLine": [
"$(engine.path)\\InventorCoreConsole.exe /i \"$(args[InventorDoc].path)\" /s \"$(args[iLogicVb].path)\""
],
"Settings": {
"dasOpenNetwork": {
"value": "true",
"isEnvironmentVariable": true
}
},
"Id": "3d4240*************be615b0d5841129f",
"ActivityId": "************************BvIGkSRJVNqs9aE.202401301411+V1",
"EngineId": "Autodesk.Inventor_2023!39",
"Apps": [],
"BoundArguments": {
"InventorDoc": {
"localName": "box_inventor.ipt",
"url": "https://developer.api.autodesk.com/Masked:kYgW**************tPuwQUMqd6k=",
"verb": "get"
},
"iLogicVb": {
"localName": "input00.iLogicVb",
"url": "https://developer.api.autodesk.com/Masked:uUdB21*******38GMaYyMWk=",
"verb": "get"
},
"Outputipt": {
"localName": "Result.ipt",
"url": "https://developer.api.autodesk.com/Masked:pmUVgi*******Invu4YRXSc=",
"verb": "put"
}
},
"Quotas": {
"limitProcessingTimeSec": 900,
"limitTotalUncompressedAppsSizeInMB": 500
}
}
[01/30/2024 05:11:46] Starting work item 3d42403b7a3f4f285b0d5841129f
[01/30/2024 05:11:46] Start download phase.
[01/30/2024 05:11:46] Start downloading input: verb - 'Get', url -
[01/30/2024 05:11:47] End downloading file.
***************************************************************
[01/30/2024 05:11:55] End upload phase successfully.
[01/30/2024 05:11:55] Job finished with result Succeeded
[01/30/2024 05:11:55] Job Status:
{
"status": "success",
"reportUrl": "https://dasprod-store.s3.amazonaws.com/workItem/kNAV4o1UQAg2Y2ZzBBvIGkSRJVNqs9aE/3d42403b7a3f4f28be615b0d5841129f/report.txt?X-Amz-Expires=90000&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEEYaCXVzLWVhc3********************2FbtLG65PisZvOjSivROiGAwu4firQY4x%ders=host0678ae5adcb1a85543676264a3e13ab2a",
"activityId": "kNAV4o1UQAgqs9aE.202401301411+V1",
"stats": {
"timeQueued": "2024-01-30T05:11:22.6723166Z",
"timeDownloadStarted": "2024-01-30T05:11:46.8212081Z",
"timeInstructionsStarted": "2024-01-30T05:11:47.1561844Z",
"timeInstructionsEnded": "2024-01-30T05:11:55.4274394Z",
"timeUploadEnded": "2024-01-30T05:11:55.6439359Z",
"bytesDownloaded": 118051,
"bytesUploaded": 190464
},
"id": "3d4240a3f4f841129f"
}
As a result of this, Result.ipt remains the original box_inventor.ipt and no dimensions have been changed. How can I change the dimensions and output the shape as Result.ipt?
"no dimensions have been changed"
Did you check the "Parameters" dialog to see if they are still the same? The geometry does stay the same as you still have to update the model - but the new values should show up in the "Parameters" dialog.
I tested things with the sample Inventor file used in the Design Automation tutorial: https://github.com/autodesk-platform-services/aps-design-automation-dotnet/tree/master/sample%20files
I used it with this sample https://aps-run-ilogic.autodesk.io/ and this iLogic Rule:
And it worked fine.
Can you reproduce the problem with the sample file I used?
Without having your file I'm wondering if it may have some automated rules (e.g. on save) that overrides parameter values
Also it occurred to me that maybe your are only verifying the results in the Autodesk Viewer? In that case try to use a different file name for each result: https://aps.autodesk.com/blog/viewer-keeps-showing-old-model