Interchange Customization

Hi,

i would like to create a pipeline with Interchange Framework for import file and read their metadata from a csv file.

Is it possible ?

Thanks

What type of format are you importing?

  • If it is a format already supported by UE you can add a custom pipeline that you will add to the default stack for that format. Probably a custom python pipeline (easier to parse csv in python than blueprints).
  • If it is a custom format you will need to write a translator, in C++, for that format.

Hello
Thank you for your help.
What I’m trying to do is automate the upload of files (whatever their format) but with a CSV file that includes data for these files.
The data is for example their position in space or versions of components etc…

You have to imagine that the data comes from a PLM and that each component can be used in several assemblies and with different positions in space each time.

So I would like to be able to run a Blueprint that could read this CSV and convert it into a DataTable or other Unreal object.

Then I would like to create Unreal Assets with the data that comes from this file

I hope to be clearer

I do not think you necessarily needs the Interchange Framework to do that.

  1. You could make an editor python script that can read your CSV and load the different files to asset and then spawn them in the scene. You can do that either without creating a datatable if you do not need to keep that information. If you want a datatable then you can create a custom structure for your datatable, import the csv file in UE as a datatable and then use the same script than describe previously reading data from the datatable instead of the csv file.

  2. Have you considered exporting a plmxml file from your PLM software and use datasmith to import that plmxml file in UE?

Hello

Thank you for your feedback!

I wanted to go through Interchange so that it would be transparent to Unreal users.

I have seen the plmxml extension but I haven’t found much documentation and help on it and it seems to me that Datasmith does not take into account OBJ formats.

Thank you

Hello

Do you have any documentation, example of use with this PLM XML format?

I can’t find anything on your site…

Thank you

OK
So I’m moving forward a little!

I created an XML file as follows:

<?xml version="1.0" encoding="UTF-8"?>
<PLMXML xmlns="http://www.plmxml.org/Schemas/PLMXMLSchema">
    <Header>
        <Author name="YourName" />
        <Organization name="YourOrganization" />
        <Date timestamp="2025-02-23T10:34:00" />
        <Context id="CTX1" name="Example Context" />
    </Header>
    <Product id="P1" name="Example Product">
        <Instance id="I1" product="P1">
            <File id="F1" format="obj" type="Geometry" location="J:/ETA/ETA 6497/ETA6497.obj" />
        </Instance>
    </Product>
    <Project id="PR1" name="Example Project">
        <Member id="M1" instance="I1" />
    </Project>
    <Revision id="R1" instance="I1" version="1.0">
        <Description>
            This is an example of a product revision.
        </Description>
    </Revision>
</PLMXML>

and when I do the import into my Datasmith object I have this in the action log

LogDataprepEditor: CleanPreviewWorld ...
LogDataprepEditor: CleanPreviewWorld took [0 min 0.000 s]
LogDataprepEditor: Import ...
LogDatasmithXMLPLMTranslator: Display: PlmXml translation [J:/ETA/ETA 6497/Test.xml].
LogDatasmithXMLPLMTranslator: Display:  - Parsing Library:      TechSoft
LogDatasmithXMLPLMTranslator: Display:  - Tessellation Library: CADKernel
LogDatasmithXMLPLMTranslator: Display:  - Cache mode:           Enabled
LogDatasmithXMLPLMTranslator: Display:  - Processing:           Parallel
LogDatasmithXMLPLMTranslator: Display:  - Import parameters:
LogDatasmithXMLPLMTranslator: Display:      - ChordTolerance:     0.300000
LogDatasmithXMLPLMTranslator: Display:      - MaxEdgeLength:      0.000000
LogDatasmithXMLPLMTranslator: Display:      - MaxNormalAngle:     30.000000
LogDatasmithXMLPLMTranslator: Display:      - StitchingTechnique: Sew
LogDatasmithXMLPLMTranslator: Display:      - Stitching Options:
LogDatasmithXMLPLMTranslator: Display:          - ForceSew:              True
LogDatasmithXMLPLMTranslator: Display:          - RemoveThinFaces:       False
LogDatasmithXMLPLMTranslator: Display:          - RemoveDuplicatedFaces: True
LogDatasmithXMLPLMTranslator: Display:          - ForceFactor:           5.000000
LogDatasmithPlmXmlImport: Warning: PlmXml file has no ProductDef tag
LogDatasmithDispatcher: Display: Multi Process ended and consumed all the tasks
LogDataprepEditor: Import took [0 min 2.343 s]
LogDataprepEditor: UpdatePreviewPanels ...
LogDataprepEditor: UpdatePreviewPanels took [0 min 0.000 s]
LogRenderer: Display: Invalidated clipmap due to WPO threshold change. This can occur due to resolution or FOV changes.

As you can see, there is nothing in the preview

You are correct, at the moment the plmxml importer will only load CAD files and not support other formats (fbx, gltf, obj, etc.)

I would write a python file that load your CSV or json
then for each file that is in your csv import the asset into UE: I would use the interchange functions directly, instead of asset import task, Importing Assets Using Interchange in Unreal Engine | Unreal Engine 5.5 Documentation | Epic Developer Community

For other references:

there is code to load datatable or parse folder to load JT files etc.

Hello

Thank you for your help!

it would be nice not to limit Datasmith to the CAD file!!

I tried this but the part doesn’t go up in the preview!

<?xml version="1.0" encoding="UTF-8"?>
<PLMXML xmlns="http://www.plmxml.org/Schemas/PLMXMLSchema">
    <Header>
        <Author name="YourName" />
        <Organization name="YourOrganization" />
        <Date timestamp="2025-02-23T10:34:00" />
        <Context id="CTX1" name="Example Context" />
    </Header>
    <Product id="P1" name="Example Product">
        <ProductDef id="PD1" name="Example Product Definition">
            <View id="V1">
                <InstanceGraph>
                    <Instance id="I1" type="ProductInstance" productDef="PD1">
                        <ExternalFile format="creo" location="J:\ETA\ETA 6497\hello.prt"/>
                    </Instance>
                </InstanceGraph>
            </View>
        </ProductDef>
    </Product>
    <Project id="PR1" name="Example Project">
        <Member id="M1" instance="I1" />
    </Project>
    <Revision id="R1" instance="I1" version="1.0">
        <Description>
            This is an example of a product revision.
        </Description>
    </Revision>
</PLMXML>

If you have to manually write the plmxml that might not be the best. I proposed it because it seems you were getting data out of a PLM system.

Here is a sample that worked for me

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PLMXML xmlns="http://www.plmxml.org/Schemas/PLMXMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="6.0" author="exentra DPTW" time="13:18:59.044+01:00" date="2021-11-17+01:00" xsi:schemaLocation="http://www.plmxml.org/Schemas/PLMXMLSchema PLMXMLSchema.xsd">
    <Product productId="YYYYY" subType="YYYY-Sub" name="Test Part" id="id56">
        <Description>Something</Description>
    </Product>
    <ProductRevision revision="000" masterRef="#id56" subType="Test Revision" name="Test Part" id="id57">
        <Description>Something</Description>
        <AssociatedDataSet dataSetRef="#id59" role="IMAN_specification" id="id58"/>
    </ProductRevision>
    <ExternalFile locationRef="J:/ETA/ETA 6497/hello.prt" format="Creo" id="id60"/>
    <DataSet version="1" type="Creo" memberRefs="#id60" id="id59">
        <Description></Description>
    </DataSet>
    <ProductDef>
        <InstanceGraph rootInstanceRef="id63">
            <ProductRevisionView type="Type" revisionRef="#id57" name="TestPart" id="id62">
                <UserData>
                    <UserValue title="UV_Title1" value="UV_Value1"/>
                </UserData>
                <Representation format="STEP" location="J:/ETA/ETA 6497/hello.prt" id="id64"/>
            </ProductRevisionView>
            <ProductInstance partRef="#id62" name="TestPart" id="id63">
                <Transform id="id65">3.84896585235067E-6 0.999999999985186 -3.84873499583817E-6 0.0 -5.99806075257956E-5 3.84896585225361E-6 0.999999998193756 0.0 0.999999998193756 -3.84873499593524E-6 5.99806223394452E-5 0.0 0.013681774880962401 -1.50836040495556E-7 -0.0215183532712489 1.0</Transform>
            </ProductInstance>
        </InstanceGraph>
    </ProductDef>
</PLMXML>

Hello,

great thanks for this example !

it’s work for me too…

Can you explain the Transform node, there is lot of parameter !!!

i see that you use STEP for PRT file, is it correct ?

Thanks

Hello

I’m coming back to you because I saw that you think I don’t use a PLM system.
I do not understand why you are saying that.
I do use a PLM system but a different process than what you present in your tutorials or documentation.

We have teams that process data from design offices.

We take CAD files that are transformed into OBJ.

These files are attached to the articles in the PLM and our graphic designers retrieve them to carry out operations on the meshes and make the UVs.

These reworked files return to the PLM to be available to other consumers (Texture Creation, Shaders, CGI, Animated Films and Real-Time 3D application).

This allows us to keep our digital channel and consume assets on the fly.

if this kind of use case is not allowed by Datasmith it’s a mistake in my opinion

I hope to be clearer :grinning:

Sorry I was not clear,
I meant you should not have to write the plmxml file manually, I expected you to be able to get it out of your PLM system or another tool directly.

Datasmith can read a plmxml file, but at the moment can only load reference files that are supported by datasmith CAD: for instance Catia, JT, Step, prt… Sadly no obj or fbx.
This is why in your case it would be faster to do a python code to parse a csv file and import your obj.

the transfrom node is most likely the 4x4 transform matrix for the node.

Hello

Thank you for these clarifications!

I am indeed thinking of abandoning this avenue for the moment because we can’t find much on how to structure these XML PLM files which must be the subject of a standard!

I tried to add a second part to your sample file but without success.

On the other hand, attributes do not go up in Datasmith, is this normal?

I wanted to do some Datasmith tests but that’ll be for another time…

Thank you again for your help

Attributes should be loaded by Datasmith, they usually go as Asset user data on imported actors

Hello
while reading the Datasmith documentation I saw this but the file you gave me as an example has attributes but they don’t appear in the Datasmith preview.

Thank you

Maybe if datasmith cannot import the mesh it does not even import the parent actor.

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