Using HoopsExchange and Publish interface A3DAsmModelFileExportToSCSFile export to scs, how to generate the corresponding ProductOccurence Id="" sc node id

I want to use HoopsExchange to implement the function of libconverter, but I need to get the id corresponding to A3DAsmProductOccurrence inside the scs after lightening, so that the front-end can select the node by the specified sc node, how can I do that, I am not quite sure how the ids generated by libconverter I’m not sure how the ids in the xml file generated by libconverter are arranged <ProductOccurence Id=“4”, is there a set of uniform generation rules, preferably with c++ code to implement

Translated with DeepL Translate: The world's most accurate translator (free version)

Hello @Rui.Zhang03 ,

Sorry, but I’m not sure I totally understand your workflow. It appears you have an Exchange/Publish based application and you are using the A3DAsmModelFileExportToSCSFile function to export an SCS file and you want to export the IDs associated with the Exchange ProductOccurence to the SCS file. Is this correct?

What I’m a bit confused about is how libconverter fits into your workflow. Maybe you’re just asking how libconverter embeds exchange IDs if you use the --export_exchange_ids option?

The ProductOccurence id I’m referring to is not the ExchangeID, but the HoopsCommunicator nodeId in the SCS file.

Hi Rui.Zhang03,
Please have a look to our documentation page:
With functions like
You should be able to achieve your goal.

1 Like

Hi Rui,Zhang03

There is a case that Node IDs are changed at run time to avoid duplication.
Load multiple SCS files using loadSubterrFromScsFile

I’ve posted a sample of entity mapping between Exchange and Communicator here:

In this sample, I add traversed body order / ID as an attribute before exporting SC and get it in HC using WebViewer API.
It can also add face and edge traversed ID as an attribute, however it is same with face and line ID of Communicator. (faceElement.getCadFaceIndex and lineElement.getLineId) So I don’t use the attribute of faces and edges in this sample.

This sample can be applied to SCS case.