Closed DavidXu-JJ closed 10 months ago
I think its better to just write a regular Fusion 360 API script without importing anything from this repository. Rather I would work from the examples to import the step file then copy across the screenshot code. So I would remove all of the client code to make things simpler.
Thanks for your kind advice!
Hi everyone. Here I have some trouble import the STEP file into fusion360 with adsk python API.
Thanks to @karldd , I try to follow https://github.com/AutodeskAILab/Fusion360GalleryDataset/blob/1084b881f3bb710267801d812d6e9286b8667059/tools/fusion360gym/server/command_export.py#L111 as is mentioned in https://github.com/AutodeskAILab/Fusion360GalleryDataset/issues/101
To import the STEP file into the fusion360 following the official adsk import manager example here: https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-3f24e9e8-422d-11e5-937b-f8b156d7cd97
I write a following program to do the import:
I simply get this output:
For the function
importManager.importToTarget
documented at https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-7472BAC7-E570-43CE-8578-268735B6FE83, return false means the failure.As is in the documentation:
Returns true if the import was successful.
My import fails, and I also output the
design.allComponents.count
as0
. All seem to mean that it doesn't import successfully.I test this code on Windows10.
What's wrong with my import code?
Thanks in advance.