How to work with DatasmithCADWorker?

Hey guys,
I’m trying to make a standalone Solid Edge (CAD) file Converter for UE5.1.1 with DatasmithSDK, following the official Dokumentation and the one on Github.
As far as I can tell DatasmithCore is for processing meshes, material, ect. into a DatasmithScene which is then exported with DatasmithExport into a .udatasmith file.
My guess is that DatasmithCADWorker is doing the actual conversioninto a usable format, since it also references the DatasmithCADImport plugin. Though I couldn’t find it referenced by other exporters or any example on how to use it. DatasmithCADWorker is not even listed in the API.

How to use DatasmithCADWorker to convert Solid Edge (CAD) files? Are there any Examples?
Is my understanding of the Datasmith API even correct?

Many thanks in advance!

Hello Tim,

DatasmithCADWorker is not used for what you want. It is a tool we use to parallelize and fail safe import of CAD files into the editor.

Datasmith CAD can read solid edge CAD file, or many other format exported by solid edge. The Editor can already read Solid Edge files, why do you actually need to do? What format do you want to convert it to?

You can use Unreal Engine to automate load solidedge files and create unreal assets. Those asset can be editor assets or cooked assets so that you can then use them directly in an editor or runtime application.

DatasmithSDK is there to help you create a plugin for a 3rd party application (solid edge) so that you can export from that application to the udatasmith format. Similar to what we did for 3dsMax, Solidworks, Revit, Rhino, etc. That requires you to make a plugin for solid edge and I do not know if that is possible. This feature is made more for application providers, big and small, that want to be able to export to UE directly.

Thanks for the fast response!
In my case I need to have a standalone application to convert .par (Part) or .asm (Assembly) into .udatasmith files with all meshes and materials.
It needs to be standalone, since it will be used by normal users that don’t have Unreal Engine installed.

I want to use the exported .udatasmith file for runtime import into another application.

In that case that is the last point I mentioned, to make an exporter for solid edge.
you can use the doc and look at the code of some of the exporters your referenced.

But basically how those plugins work is that since they are embedded in the DCC application, it uses the CAD application library to extract the primitives from the scene: geometries, nurbs, materials, product tree, metadata and convert those to udatasmith using the SDK. None of these plugins works by exporting a file in the native DCC format and then converting it to udatasmith.

So you have 3 solutions none fully satisfying:

  1. Datasmith exporter route that you are evaluating. Can be nice, give you runtime import, direct link etc. But require you to write a solid edge plugin that will use solidedge sdk to get primitives from solidedge and convert that to udatasmith

  2. Use a UE application to read CAD file, create asset, then cook the generated assets so that you get “cooked asset” or pak file that you can then load directly at runtime. Cooked asset will need to be recooked if you change the UE version that the application uses

  3. We are working to add CAD load at runtime, but it is very experimental and will stay so for months.

1 Like

Thanks a lot!
I will give the first Solution a try.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.