Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bug found causing AcCoreConsole to fail during import of Inventor .iam

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
DynamicObjects
1260 Views, 13 Replies

Bug found causing AcCoreConsole to fail during import of Inventor .iam

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

------------------------------------------------------------------------------------------------------------
Atkins Consultants Ltd UK
+19,000 staff (M&E, Civils, Structural, Geotechnical, Environmental and more)
13 REPLIES 13
Message 2 of 14

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.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 3 of 14
TheCADnoob
in reply to: DynamicObjects

have you tried throwing something like a delay in the script to try to let the program catch up?

 

https://knowledge.autodesk.com/support/autocad-lt/learn-explore/caas/CloudHelp/cloudhelp/2017/ENU/Au...

CADnoob

EESignature

Message 4 of 14
DynamicObjects
in reply to: TheCADnoob

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.

------------------------------------------------------------------------------------------------------------
Atkins Consultants Ltd UK
+19,000 staff (M&E, Civils, Structural, Geotechnical, Environmental and more)
Message 5 of 14

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:

  • "C:\Program Files\Autodesk\AutoCAD 2017\accoreconsole.exe" /i "C:\Temp\Testing\acadiso3D-metres.dwt"
  • IMPORT "C:\Temp\Testing\Test - DWG - HiltonLOD350 - 27 Jun 18.iam"
  • SAVEAS 2013 "C:\Temp\Testing\ImportedLOD350.dwg"

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).  

 

------------------------------------------------------------------------------------------------------------
Atkins Consultants Ltd UK
+19,000 staff (M&E, Civils, Structural, Geotechnical, Environmental and more)
Message 6 of 14
TheCADnoob
in reply to: DynamicObjects

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

EESignature

Message 7 of 14
DynamicObjects
in reply to: TheCADnoob

Don't think the characters are the issue. You'll find that without them you get the same behaviour. Also you'll find that issuing the same commands in ACAD console will yield success. Doing so in ACore yields failure. -Remember that the translation aspect IS succeeding - but the file is not being inserted into the User's dwg - it's being left in the %tmp% folder as i outlined in the OP.
------------------------------------------------------------------------------------------------------------
Atkins Consultants Ltd UK
+19,000 staff (M&E, Civils, Structural, Geotechnical, Environmental and more)
Message 8 of 14

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.

 

 


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 9 of 14
john.vellek
in reply to: john.vellek

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.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 10 of 14

Hi John,

Thanks for reporting this up the line.
The workaround we have implemented is some additional code that checks the contents of the dwg created by acCoreConsole after the IMPORT command and SAVEAS commands have completed. If the dwg does not contain a block then we conclude that the IMPORT failed and we issue an -INSERT command with the filename of the most recent dwg found in the %tmp% folder that has a timestamp later than the point the script was initially triggered. Then finally we call SAVEAS again.
This workaround is working for us for now.

Thanks for you quick responses.
If there is a mailing list associated with the bugfix please add me.

Regards
Dan
------------------------------------------------------------------------------------------------------------
Atkins Consultants Ltd UK
+19,000 staff (M&E, Civils, Structural, Geotechnical, Environmental and more)
Message 11 of 14

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.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 12 of 14

Hi John - is there any update on this issue?
------------------------------------------------------------------------------------------------------------
Atkins Consultants Ltd UK
+19,000 staff (M&E, Civils, Structural, Geotechnical, Environmental and more)
Message 13 of 14

Dear @chandra.shekar.g - I think John Vellek may have left Autodesk. Could you check if issue number 214113 has been resolved or if there is a workaround available please?
------------------------------------------------------------------------------------------------------------
Atkins Consultants Ltd UK
+19,000 staff (M&E, Civils, Structural, Geotechnical, Environmental and more)
Message 14 of 14

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.

Post to forums  

Forma Design Contest


AutoCAD Beta