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

**URL:** <https://forum.techsoft3d.com/t/using-hoopsexchange-and-publish-interface-a3dasmmodelfileexporttoscsfile-export-to-scs-how-to-generate-the-corresponding-productoccurence-id-sc-node-id/1827>\
**Category:** HOOPS Exchange\
**Created:** [April 6, 2023, 7:42am UTC](https://forum.techsoft3d.com/t/using-hoopsexchange-and-publish-interface-a3dasmmodelfileexporttoscsfile-export-to-scs-how-to-generate-the-corresponding-productoccurence-id-sc-node-id/1827 "2023-04-06T07:42:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rui.Zhang03](https://avatars.discourse-cdn.com/v4/letter/r/898d66/32.png) [@Rui.Zhang03](https://forum.techsoft3d.com/u/Rui.Zhang03)\
**Post date:** [April 6, 2023, 7:42am UTC](https://forum.techsoft3d.com/t/using-hoopsexchange-and-publish-interface-a3dasmmodelfileexporttoscsfile-export-to-scs-how-to-generate-the-corresponding-productoccurence-id-sc-node-id/1827/1 "2023-04-06T07:42:06Z")

</div>

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](http://www.DeepL.com/Translator) (free version)

---

<div class="post-metadata">

**Author:** ![rtadlock](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/rtadlock/32/14_2.png) [@rtadlock](https://forum.techsoft3d.com/u/rtadlock)\
**Post date:** [April 6, 2023, 10:50pm UTC](https://forum.techsoft3d.com/t/using-hoopsexchange-and-publish-interface-a3dasmmodelfileexporttoscsfile-export-to-scs-how-to-generate-the-corresponding-productoccurence-id-sc-node-id/1827/2 "2023-04-06T22:50:52Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Rui.Zhang03](https://avatars.discourse-cdn.com/v4/letter/r/898d66/32.png) [@Rui.Zhang03](https://forum.techsoft3d.com/u/Rui.Zhang03)\
**Post date:** [April 7, 2023, 6:50am UTC](https://forum.techsoft3d.com/t/using-hoopsexchange-and-publish-interface-a3dasmmodelfileexporttoscsfile-export-to-scs-how-to-generate-the-corresponding-productoccurence-id-sc-node-id/1827/3 "2023-04-07T06:50:45Z")

</div>

> [@rtadlock](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![isabelle](https://avatars.discourse-cdn.com/v4/letter/i/b5a626/32.png) [@isabelle](https://forum.techsoft3d.com/u/isabelle)\
**Post date:** [April 7, 2023, 8:41am UTC](https://forum.techsoft3d.com/t/using-hoopsexchange-and-publish-interface-a3dasmmodelfileexporttoscsfile-export-to-scs-how-to-generate-the-corresponding-productoccurence-id-sc-node-id/1827/4 "2023-04-07T08:41:10Z")

</div>

Hi Rui.Zhang03,  
Please have a look to our documentation page:  
[https://docs.techsoft3d.com/publish/latest/api/A3DPDFReadWrite\_8h.html#\_CPPv417A3DPrcIdMapCreateP15A3DAsmModelFilePP11A3DPrcIdMap](https://docs.techsoft3d.com/publish/latest/api/A3DPDFReadWrite_8h.html#_CPPv417A3DPrcIdMapCreateP15A3DAsmModelFilePP11A3DPrcIdMap)  
With functions like  
A3DPrcIdMapCreate  
A3DPrcIdMapFindEntity  
A3DPrcIdMapFindId  
You should be able to achieve your goal.  
Thanks,  
Isabelle

---

<div class="post-metadata">

**Author:** ![Toshi-TS3D](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/toshi-ts3d/32/885_2.png) [@Toshi-TS3D](https://forum.techsoft3d.com/u/Toshi-TS3D)\
**Post date:** [April 12, 2023, 10:21am UTC](https://forum.techsoft3d.com/t/using-hoopsexchange-and-publish-interface-a3dasmmodelfileexporttoscsfile-export-to-scs-how-to-generate-the-corresponding-productoccurence-id-sc-node-id/1827/5 "2023-04-12T10:21:33Z")

</div>

Hi Rui,Zhang03

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

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

> [@How HOOPS Communicator can use server side Exchange processes](https://forum.techsoft3d.com/t/how-hoops-communicator-can-use-server-side-exchange-processes/1841):
>
> [[server side exchange] ](https://www.youtube.com/watch?v=fMDCIDHsGZE)Introduction As you can see in the above demo video, this sample illustrates how to create an interactive 3D model Web viewer from uploading a CAD file to visualization. Server side loads a CAD file using HOOPS Exchange and exports SC model using libconverter of HOOPS Communicator. By using Exchange and libconverter separately instead of HC Converter, import options and advanced features of Exchange which are not supported by Converter can be used. Furthermo…

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.

Toshi
