Hi Autodesk
I am reporting a bug that we have found when using AcCoreConsole to IMPORT .iam files (Inventor Assembly files).
When we run our script in AutoCAD 2016 the IMPORT command completes correctly and yields a model.
When we run the same script in AcCoreConsole (2016) the IMPORT command fails for some of the bigger models (nothing excessively large) resulting in no content... and we think we have found out why it fails and we have written a workaround for ourselves.
What we noticed is that regardless of how we launch the IMPORT command (i.e. whether AutoCAD or ACore) the acTranslators process starts up (presumably to do the heavy lifting of the translation) and during this time it creates a temporary dwg file in a temp folder (e.g. C:\Users\*****\AppData\Local\Temp\dwg93C6.dwg for Windows10). When the IMPORT command is successful this temp file and all other associated temp files get cleaned up and disappear. In fact this temp file is probably the one that gets returned to the User at this stage. However when the IMPORT command fails these files do not get cleaned up and can be inspected. Inspecting the temp dwg created by acTranslators shows that the translation was actually successful and the translated model is fully present. What we believe is happening is that acTranslators might be prematurely declaring that it has finished saving the temporary dwg before it actually has completed. Then the master process, in the case of ACore, immediately looks for the temporary file slightly before it exists and AcCore therefore fails returning to the User an empty dwg and fails to clean up temp files because they are not there .. moments later the temp dwg pops into existence now that acTranslators really has completed the save - but alas it is too late. The reason we believe this is not seen when issuing the IMPORT command in ACAD is that there is a pause between the acTranslators background IMPORT method completing and the point where the User is asked to click on the popup bubble to effectively insert the translated file - whereas in ACore there is no pause for User interaction.
How to replicate in AutoCAD 2016 :
1) Use ACAD to IMPORT a reasonably big .iam Inventor file and see it succeed.
2) Use AcCoreConsole to IMPORT the same file and see it fail by yielding a dwg of only a few kB (30-50kB). Go look in the temp folder and see that acTranslators actually succeeded to create a large model dwg of several 100 kB but didn't manage to pass it back to acCoreConsole.
Our workaround has been to examine the content of the file created by AcCoreConsole IMPORT - and if the file is empty we then retrieve the temp dwg from the temp folder. Although this works for us it is not nice. Also it is further phaff because the dwgunits are not the same for the temp dwg created by acTranslators and the dwg returned by ACAD or ACore when they succeed (presumably ACAD and ACore do a little post processing to insert the temp dwg created by acTranslators into the Users dwg using the correct units). So as part of our workaround we have to do this ourselves now as a couple of additional lines in the script.
Hope you can fix
Regards
Dan
Solved! Go to Solution.
Solved by DynamicObjects. Go to Solution.
Solved by john.vellek. Go to Solution.
Hi @DynamicObjects,
This is interesting and I would like to bring it to the team for investigation but I would like to get some more details.
Please prepare an NFO for me from the computer where you perform this process with AcCoreConsole.
Please also provide me with some sample data such as the IAM that does not seem to import completely and the script of functions you run in AcCoreConsole?
It sounds like you do this process on the local C: drive but do you have roaming profiles enabled? When you run AcCoreConsole, do you do this with administrator permissions of something else? Are the files stored on the local machine or do they reside on a network share? Have you tried this process in newer versions of AutoCAD?
Please select the Accept as Solution button if my post solves your issue or answers your question.
have you tried throwing something like a delay in the script to try to let the program catch up?
CADnoob
Hi CadNoob, thanks for the suggestion.
The issue is present even if you issue the commands one at a time manually.
Doesn't make any difference how long you delay before the IMPORT command or how long you delay after the IMPORT command. If you treat the IMPORT method as a black box, the error or fail is occurring inside the black box, and its not possible to place a DELAY command inside that black box we can only place it before or after it --which is no good.
Hi @john.vellek.
My environment:
I've attached (via link) the NFO for my Windows 10 laptop rather than our Win8 Server environment.
I can confirm that the behavior is the same on both environments.
Our Server is running AutoCAD 2018 and my laptop is running AutoCAD 2017 (apologies in my original post i said 2016).
Both environments run (and therefore file versions are for) Inventor Professional 2016 with up to date service packs.
In both environments we run the process on the local C: drive (D: drive on server).
On my laptop i am a regular User so am not logged in as an Administrator (work locked down) but i do have elevated permissions and I do have a roaming profile enabled although AutoCAD seems to use the local profile in preference.
On the server we are running as Administrator with full permissions.
The files that pertain to the actions being performed are all residing locally on the same C: or 😧 drive in a nothing special read/write permissions folder.
The commands:
To reproduce the behavior open the console and at the command prompt issue the following commands:
You can experiment yourself but i found that no amount of waiting before issuing the final SAVEAS command made any difference - and its informative to keep the %temp% folder open and the TaskManager open where you can monitor the creation of the temp dwg and other items and the spawning of the acTranslators process.
Also, we found that my laptop succeeded to import models slightly larger than would succeed on the server environment. We felt this was probably due to the higher spec performance of my laptop hence quicker saving of the temp dwg file leading to less failed handshakes from acTranslators to acCoreConsole.
Files:
I attempted to zip and attached the folder containing the above files so that you can see the results achieved.
However the zip file exceeds the upload limit. So here is a link to my GoogleDrive where you can download it all as a zip file (including the NFO).
I cant test your files at the moment, but will see if i can duplicate the problem when i get on a different machine.
I did see the superscript characters in the file names. Have you tried using only basic characters in the part filenames and see if that works?
CADnoob
Hi @DynamicObjects,
I am able to duplicate the results and will try this in different versions of AutoCAD to see what difference it makes on my side.
Thanks for your patience.
[Edit] I ran through this exact script in AutoCAD 2016 and found the same results as with 2017 and 2018. I need to do some more research.
Hi @DynamicObjects,
I have brought this issue to development and they have confirmed the behavior that you and I see in AcCoreConsole.
I am not sure that there is an imminent fix or workaround at present.
Have you tried importing a smaller amount of data to see if that improves the situation? If so you could perhaps combine files at the end of the process.
Please select the Accept as Solution button if my post solves your issue or answers your question.
Hi @DynamicObjects,
If I fail to get back to you on this issue, here is the issue number 214113. You are welcome to ping me anytime so I will remember to check the status of this issue.
The status of the 214113 is that it is addressed in AutoCAD 2020.
Can you please test the workflow in AutoCAD 2020.(accoreconsole.exe)
Can't find what you're looking for? Ask the community or share your knowledge.