🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Creating Assembly Hierarchy from Excel and Script

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

Hi Experts,

 

I want to automate the assembly creation, I can go in 2 ways.

1. Create an assembly hierarchy in excel file and use the script to implement in my hm file.

2. Create a script to create the assembly hierarchy in hm itself using the user input (selecting the sub-assemblies and components together to form an assembly).

Which option would be easier and feasible.

 

I am just a beginner in TCL.

Thanks in advance!!

Find more posts tagged with

Sort by:
1 - 5 of 51
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi Experts,

     

    I want to automate the assembly creation, I can go in 2 ways.

    1. Create an assembly hierarchy in excel file and use the script to implement in my hm file.

    2. Create a script to create the assembly hierarchy in hm itself using the user input (selecting the sub-assemblies and components together to form an assembly).

    Which option would be easier and feasible.

     

    I am just a beginner in TCL.

    Thanks in advance!!

     

    Hi, 

    both are feasible, option (2) is easier because it does not have to parse the excel file

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Thanks a lot for the info!!

    I`ve started working on it but I want to know the command for either of these

    1. How to get the assembly ID of a component.

    2. How can I get the list of component ID's in an Assembly.

     

    Please share.

     

    Thanks and Regards

    Harmeek

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hello

    - to get assembly IDs of a component (not unique, because one comp can belong to several assems)

     *createmark comps 1 'by id only' $CompId *findmark comps 1 1 1 assems 0 2 set AssemIdList [hm_getmark assems 2]

     

    - to get comp IDs in an assem:

     set CompIdList [hm_getvalue assems id=$AssemId dataname=components]

     

    User: "Aditya Palsule"
    Altair Community Member
    Updated by Aditya Palsule

    Hello,

     

    I am trying to isolate/show assemblies but when I use

     

    *startnotehistorystate {show Assembly}
    *createmark assemblies 2 $isolate_assembly
    *createstringarray 2 'elements_on' 'geometry_on'
    *showentitybymark 2 1 2
    *endnotehistorystate {show Assembly}

     

    it dosen't work, but instead of variable if I use assembly name directly it works.

     

    Am i missing out something? But using variable name for components worked well.

    User: "Aditya Palsule"
    Altair Community Member
    Updated by Aditya Palsule

    Sorry my bad...it worked...