Forum Discussion

depk_topsoe_com's avatar
depk_topsoe_com
Ideator II
1 month ago

What is the fastest way to create a Part, assembly and their BOM?

Hi Team,

I have an XML file that contains Part properties and their BOM structure. The XML follows a bottom-up approach

When processing this data using the Aras IOM object model to create an assembly consisting of 111 partsThe structure is as follows:

  1. Part properties STEP (STP) filesAssembly Part
  2. BOM creation involves adding or updating relationships between the assembly and its child parts

The processing is currently done sequentiallyCould you please advise on how to improve performance when processing large assemblies like this?

4 Replies

  • I agree with little_legend​. Create all the parts first, then you can create all files in a single transaction, while also creating the part BOM records. If you are importing a large amount of data, they can be grouped into logical batches as sending thousands of Items in one request could take a while.

  •  

    Let me rewrite,

    I have an XML file that contains Part properties and their BOM structure. The XML follows a bottom-up approach, where all child parts are defined first, followed by their parent assemblies.

    When processing this data using the Aras IOM object model, it takes approximately 16–17 minutes to create an assembly consisting of 111 parts in Aras Innovator.

    The structure is as follows:

    1. Part

    Part properties

    STEP (STP) files

     

    2. Assembly Part

    Part properties

    STEP (STP) file

    PDF file

     

    3. BOM

    BOM creation involves adding or updating relationships between the assembly and its child parts

    The processing is currently done sequentially to allow error logging if any issue occurs.

     

    Could you please advise on how to improve performance when processing large assemblies like this?

     

    Thank in advance.

    • little_legend's avatar
      little_legend
      Creator II

      Hello,

      You could try to combine the queries which should create/update the data. Even if you start from the children, it would be possible to combine the queries. So at the end you will have one large query, which will be executed once. 

      I don't know how familiar you are with the API, but you can use addRelationship/createRelationship, createRelatedItem, setRelatedItem to build up the query, and especially the different relationships. There should be enough information here in the forum, or if you try to search directly in the API documentation.

      Let me know if you have any questions or concerns.

      Regards

  • I agree with little_legend and what to add something.

    It is faster to add parts in one AML statement than to have one AML per objet.

    For example: 

    Do this:

    <AML>
    <Item type='Part' action='add'></Item>
    <Item type='Part' action='add'></Item>
    <Item type='Part' action='add'></Item>
    (...)
    </AML>

    instaed of this:

    <AML>
    <Item type='Part' action='add'></Item>
    </AML>
    <AML>
    <Item type='Part' action='add'></Item>
    </AML>
    <AML>
    <Item type='Part' action='add'></Item>
    </AML>

    After you have added all your parts, than proceed with your relationships. 

    If you want to have it even faster than this than you have to work with Aras Batchloader. This tool can do process batches paralell. But I don't have experience with this.

    Another option would be to customize a proper worker with job queue which is able to parallize such jobs. But this is heavy customizig.

    Regards

    Patrick