🎉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

How to rename all component name (which are starting with number currently) starting with alphabet (Lets say A_)?

User: "DGK"
Altair Community Member
Updated by unknown

For Abaqus profile, if the component name starts with a numeric character, it return the Syntax error. Hence, for Abaqus jobs, all the component names should start from Alphabet.

 

Currently all my component name starts from number. And those are hundreds in number. It is very tedious task to rename one by one by adding A_ (lets say) in front of each component name.

 

So my request is how to add A_ in front of all the component names?

Find more posts tagged with

Sort by:
1 - 4 of 41
    User: "PaulAltair"
    Altair Employee
    Updated by PaulAltair

    I adapted this tool from somewhere, a long while back? It has multiple find/replace capability, including a 1 click option to sort out all special characters or spaces, it doesn't have the specific option to add a prefix, but depending on your names, you may be able to workaround it as below, if this doesn't do what you need, maybe I could revisit it and add prefix as an option... load the tcl in HW/HM to use it

    image

    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    For your simple case I think copying the following in a file and running it or running the following in the tcl console should work.

    hm_createmark comps 1 "advanced" "all"

    foreach compID [hm_getmark comps 1] {

        set compName [hm_getvalue comps id=$compID dataname=name]

        *setvalue comps id=$compID name="A$compName"

    }

    User: "Jason_Craanen"
    Altair Employee
    Updated by Jason_Craanen

    For your simple case I think copying the following in a file and running it or running the following in the tcl console should work.

    hm_createmark comps 1 "advanced" "all"

    foreach compID [hm_getmark comps 1] {

        set compName [hm_getvalue comps id=$compID dataname=name]

        *setvalue comps id=$compID name="A$compName"

    }

    there is also this in-core tool you can find through the search
    image

     

    User: "Jason_Craanen"
    Altair Employee
    Updated by Jason_Craanen

    You may want to try the Matrix Browser which allows you to make changes in Excel and push back to Hypermesh

    image