tcl code to import .inp geometry

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

Hi,

I have a tcl code that modifies an .inp mesh. I want to incorporate an automatic import line to it, however can't seem to get it to work. What I have at the moment is:

*feinputpreserveincludefiles

*createstringarray 2 'Abaqus ' 'Standard3D '

*feinputwithdata2 '#abaqus\abaqus' 'D:/02_Scripting/HyperMesh/unit_cell_1.inp' 0 0 0 0 0 1 2 1 0

When I run this code, the following error message appears: 'The translator does not exist'.

Would anyone be able to assist me with this?

Thanks a lot!

Find more posts tagged with

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

    Ok, turns out that it was a silly mistake.

    The third line of the code should be:

    *feinputwithdata2 '#abaqus/abaqus' 'D:/02_Scripting/HyperMesh/unit_cell_1.inp' 0 0 0 0 0 1 2 1 0

    (a forward slash is used before abaqus)

    image/emoticons/default_smile.png' alt=':)' srcset='/emoticons/smile@2x.png 2x' width='20' height='20'>

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User
    I'm also trying to import .inp files and save them as a single .hm file.

     

    My .cmf file is:


     

       *evaltclscript('C:/Users/Lowell/Documents/SSM_Project/PCA_LOO/HM_IMPORT_04.tcl', 0)

     

    and my .tcl file is:


     

       *begin 'version 11.0.0.47  1-7-2014  13:12:22' 

       *templatefileset 'C:/Program Files/Altair/11.0/templates/feoutput/abaqus/explicit' 

       *menufilterset '*' 

       *menufilterdisable 

       *feinputpreserveincludefiles 

       *createstringarray 2  'HyperMesh ' ' ' 

       *feinputwithdata2 '#abaqus/abaqus' 'C:/Users/Lowell/Documents/SSM_Project/PCA_LOO/RESULTS_BUILDMODEL/model_04/model_04icp.inp' 0 0 0 0 0 1 2 1 0 

       *feinputpreserveincludefiles 

       *createstringarray 2  'HyperMesh ' ' ' 

       *feinputwithdata2 '#abaqus/abaqus' 'C:/Users/Lowell/Documents/SSM_Project/PCA_LOO/RESULTS_BUILDMODEL_OPT/MODEL_04/model_04icp.inp' 0 0 0 0 0 1 2 1 0 

       *setdisplayattributes 2 0  

       *view 'rightside' 

       *writefile 'C:/Users/Lowell/Documents/SSM_Project/PCA_LOO/MODEL_04_COMPARISON.hm' 1 

     

    This works when I open Hypermesh and go to File>Run>Command File and select the above .cmf file. The problem is that this does not work when I try to run it via DOS using:

     

       hmbatch -cC:/Users/Lowell/Documents/SSM_Project/PCA_LOO//HM_IMPORT_04.cmf

     

    I get the following error:

     


       Tcl/Tk script error:  

       0  

           while executing  

       '*feinputwithdata2 '#abaqus/abaqus' 'C:/Users/Lowell/Documents/SSM_Project/PCA_LOO/RESULTS_BUILDMODEL/model_04/model_04icp.inp' 0 0 0 0 0 1 2 1 0 '  

           (file 'C:/Users/Lowell/Documents/SSM_Project/PCA_LOO/HM_IMPORT_04.tcl' line 7) 

     

    I don't think this is a syntax issue because the files work when I manually open HM but I'd like to do this all through DOS.

     

    Much thanks!

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

    I am having the same issue as lowell. The tcl script works within the Hypermesh GUI, but fails with the same error using hmbatch. Would appreciate any help being offered!

    User: "ATLURI BHARATH KUMAR"
    Altair Community Member
    Updated by ATLURI BHARATH KUMAR

    I am having the same issue as lowell. The tcl script works within the Hypermesh GUI, but fails with the same error using hmbatch. Would appreciate any help being offered!

    can anyone tell why hmbatch import is not working?