Hypermesh 2021.2 does not recognise names, 2021.1 worked fine

fc
fc Altair Community Member
edited February 26 in Community Q&A

Hi, on Hypermesh 2021.1 I've created a .tcl script which was working correctly.

I have now updated to 2021.2: under the Optistruct user profile I had to change stuff like the *setvalue <select_type>=<selection> from name to ids otherwise it wouldn't work.

I have now the same problem with these lines under the Abaqus user profile

*createentity sets cardimage="SURFACE_ELEMENT" type=2 name="set1" *clearmark sets 1 *setvalue sets id=17 id={Sets 1} *setvalue sets id=1 name=dist_inf2molla *setvalue sets id=1 STATUS=2 139=3 *createmark elements 1 2 *createmark nodes 1 9-12 *segmentsetaddfaces "dist_inf2molla" 1 1 30 1 1

I get an "specified segment set does not exist" error for the last line since apparently Hypermesh does not want to use names. Of course "Abaqus is a name-based solver which uses a label/string to reference entities" so I cannot find alternatives.

Is this expected behaviour? Is there anything I can do regarding the changes in id synchronization made in the Hypermesh 2021.2 update?

Thanks

Answers

  • Subhu
    Subhu Altair Community Member
    edited February 20

    Hi,

     

    Try this -->> *createentity sets cardimage="SURF" type=2 name="set1"

  • fc
    fc Altair Community Member
    edited February 20

    Thanks for your reply :)

    I have tried what you're suggesting but unfortunately it gives me the same error. Also, I need cardimage to be "surface_element" because I need to export to an abaqus .inp file, though I don't know if in 2021.2 "surf" is the new "surface_element"

     

    EDIT - I have enabled the script debugger and I've obtained this log (also attached)

    0 0     while executing "*setvalue sets name=inf ids={elems 2}"     (file "D:/Fcaroli/coil working directory/01_00/MacroHM_01_00.tcl" line 87)     invoked from within "source {D:/Fcaroli/coil working directory/01_00/MacroHM_01_00.tcl}"     ("uplevel" body line 1)     invoked from within "# Compiled -- no source code available error "called a copy of a compiled script""     (procedure "::hw::RunTclTkScpt" line 1)     invoked from within "::hw::RunTclTkScpt"     ("eval" body line 1)     invoked from within "# Compiled -- no source code available error "called a copy of a compiled script""     (procedure "::hw::p_TbCmdSelection" line 1)     invoked from within "::hw::p_TbCmdSelection ::hw::RunTclTkScpt runMenu 0"     ("eval" body line 1)     invoked from within "# Compiled -- no source code available error "called a copy of a compiled script""     (procedure "::hwt::ReleaseCanvasButton" line 1)     invoked from within "::hwt::ReleaseCanvasButton 0 ._Tb_Scripting.runMenu.b"     (command bound to event)
  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited February 23
    fc said:

    Thanks for your reply :)

    I have tried what you're suggesting but unfortunately it gives me the same error. Also, I need cardimage to be "surface_element" because I need to export to an abaqus .inp file, though I don't know if in 2021.2 "surf" is the new "surface_element"

     

    EDIT - I have enabled the script debugger and I've obtained this log (also attached)

    0 0     while executing "*setvalue sets name=inf ids={elems 2}"     (file "D:/Fcaroli/coil working directory/01_00/MacroHM_01_00.tcl" line 87)     invoked from within "source {D:/Fcaroli/coil working directory/01_00/MacroHM_01_00.tcl}"     ("uplevel" body line 1)     invoked from within "# Compiled -- no source code available error "called a copy of a compiled script""     (procedure "::hw::RunTclTkScpt" line 1)     invoked from within "::hw::RunTclTkScpt"     ("eval" body line 1)     invoked from within "# Compiled -- no source code available error "called a copy of a compiled script""     (procedure "::hw::p_TbCmdSelection" line 1)     invoked from within "::hw::p_TbCmdSelection ::hw::RunTclTkScpt runMenu 0"     ("eval" body line 1)     invoked from within "# Compiled -- no source code available error "called a copy of a compiled script""     (procedure "::hwt::ReleaseCanvasButton" line 1)     invoked from within "::hwt::ReleaseCanvasButton 0 ._Tb_Scripting.runMenu.b"     (command bound to event)

    What is the message in the bottom left corner when you get this error? How do you know the ids in your code since those are hard coded in and not a variable?

  • fc
    fc Altair Community Member
    edited February 23

    What is the message in the bottom left corner when you get this error? How do you know the ids in your code since those are hard coded in and not a variable?

    Error message is "specified segment set does not exist". I also get "*setvalue: sets with name inf is not a valid entity"

    I know the IDs because the script explicitly changes them to the ones I need (anyway they are visible in the UI)

    I also have the issue that if I execute the exact lines Hypermesh created in command1.tcl when switching user from Optistruct to Abaqus, it will not actually change anything

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited February 23
    fc said:

    Error message is "specified segment set does not exist". I also get "*setvalue: sets with name inf is not a valid entity"

    I know the IDs because the script explicitly changes them to the ones I need (anyway they are visible in the UI)

    I also have the issue that if I execute the exact lines Hypermesh created in command1.tcl when switching user from Optistruct to Abaqus, it will not actually change anything

    Looks like you need to use *segmentsetaddshells (or I imagine the *segmentsetaddfaces would work too) not *setvalue.

     
  • fc
    fc Altair Community Member
    edited February 23

    Looks like you need to use *segmentsetaddshells (or I imagine the *segmentsetaddfaces would work too) not *setvalue.

     

    Thanks for your replies. *setvalue did work on 2021.1. The issue is not *setvalue per se, but rather that Hypermesh does not recognise names, only IDs. I can try to avoid names to some extend but there must be a reason I need to do so on 2021.2.

     

    I've also tried reinstalling Hyperworks (while having checked the installer md5 checksum), with no luck. "no source code available" can't be right I think

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited February 23
    fc said:

    Thanks for your replies. *setvalue did work on 2021.1. The issue is not *setvalue per se, but rather that Hypermesh does not recognise names, only IDs. I can try to avoid names to some extend but there must be a reason I need to do so on 2021.2.

     

    I've also tried reinstalling Hyperworks (while having checked the installer md5 checksum), with no luck. "no source code available" can't be right I think

    I am able to use names, so it doesn't seem to be specific to names.

  • fc
    fc Altair Community Member
    edited February 23

    I am able to use names, so it doesn't seem to be specific to names.

    I'm saying it's specific to names only from the errors Hypermesh displays. But as you say, I was able to use name too, so I can't find why it does not work with 2021.2. Thanks for your feedback on that

     

    Names not working might be an issue related to the Abaqus interface not working properly (?) but I don't really know how to deal with that. Maybe there are some settings I need to adjust?

  • fc
    fc Altair Community Member
    edited February 26

    [CORRECT ANSWER]

     

    Apparently, in 2021.2 the command "*setvalue sets id=xxx name=yyy" does change a set's name in the user interface, but it does NOT change the internal name. In Hypermesh 2021.1 it worked fine

     

    The solution is to apply the desired name directly with the "*createentity sets cardimage="xxx" type=yyy name="zzz"" command, which successfully modifies both the internal name and the one shown in the UI

     

    Also, 2021.2 applies Set IDs starting from the latest+1 as 2021.1, but 2021.2 has different ID counts for Sets and  for Set Segments