Error running Hypermesh 2017 with command prompt
Hi,
I have a tcl script to model simple bracket and export Abaqus solverdeck file. My script works fine in Hypermesh command prompt. However, I want to run that script without GUI from command prompt. When I try, I got Error: 'The file being opened for reading does not exist.'
My command : C:\Program Files\Altair\2017\hm\bin\win64>hmbatch -tcl E:\Automatic_Mesh_Generation_Scripts\Mid_to_Export.tcl
My tcl script:
*geomimport 'auto_detect' 'E:/TARIK/Scripts/Hypermesh_Scripting/DENEME_CAD/from_sorhan/ASY-0005865-6C46-6622-BA1_proposal_2.stp' 'CleanupTol=-0.01' 'DoNotMergeEdges=on' 'ImportBlanked=off' 'ScaleFactor=1'
*end_batch_import
*createmark comps 1 'all'
set number_of_component [hm_getmark comps 1]
*createmark surfaces 1 'all'
*midsurface_extract_10 surfaces 1 -1 0 1 1 9 0 20 0 0 10 0 10 -2 undefined 0 0 -3
*deletemark comps 1
*createmark surfaces 1 'displayed'
*createstringarray 1 'breakconnectivity 0'
*hm_batchmesh2 surfaces 1 1 1 'E:/Automatic_Mesh_Generation_Scripts/batchmesh/durability_3mm.criteria' 'E:/Automatic_Mesh_Generation_Scripts/batchmesh/durability_3mm.param'
proc CreateSpiders {args} {
if {[array exists ::hole_nodes] == 1} {
array unset ::hole_nodes
}
*createmark components 1 'all'
set holes_comp [hm_ce_gethmholes 1 20 0 1 0 1]
foreach e $holes_comp {
#puts $e
set s_l [lrange $e 1 end]
set comp_no [lindex $e 0]
foreach h $s_l {
#puts $h
set short_list [lindex [lindex $h 1] 0]
#puts $short_list
lappend ::hole_nodes($comp_no) [lindex [lindex $short_list 0] 0]
}
}
#eval *createmark nodes 1 $hole_nodes
*collectorcreateonly comps 'spiders'
foreach cmpt [array names ::hole_nodes] {
#puts $cmpt
eval *createmark comps 2 $cmpt
eval *createmark nodes 1 $::hole_nodes($cmpt)
*createstringarray 5 'link_elems_geom=elems' 'link_rule=now' 'relink_rule=none' 'tol_flag=1' 'tol=1.000000'
*CE_ConnectorCreateByMark nodes 1 'bolt' 1 components 2 1 5
*clearmark comps 2
}
#realizing the connectors
*createmark connectors 1 'by component' 'spiders'
*createstringarray 4 'ce_notuseijk=1' 'ce_boltmindiameter=0.000000' 'ce_boltmaxdiameter=100.000000' 'ce_systems=0'
*CE_FE_RealizeWithDetails 1 'bolt' 'abaqus' 1001 7 0 20 1 4
*CE_FE_GlobalFlags 0 0
*createmark connectors 1 'by component' 'spiders'
*deletemark connectors 1
}
CreateSpiders
*feoutputwithdata 'C:/Program Files/Altair/2017/templates/feoutput/abaqus/standard.3d' 'E:/TARIK/Scripts/Hypermesh_Scripting/Input/Brakcket.inp' 0 0 1 1 2