Pourquoi en créant des propriétés PSOLID en batch les propriétés n'ont pas de cardimage associées?

Chloé paolpi
Chloé paolpi Altair Community Member
edited December 2022 in Community Q&A

J'ai crée un code TCL qui permet de créer des propriétés PSOLID en batch et qui permet de les exporter dans un include sauf que l'export de ces propriétés ne fonctionne pas car elles n'ont pas de cardimage associé.

Auriez-vous une solution?

Voici mon code:

#Création des propriétés
set a 1
set b 1
set c 0
set Psolid [list]
foreach x $eplist {
*createentity props cardimage=PSOLID includeid=2 name="property1"
*createmark properties 1 "property1"
*clearmark properties 1
*setvalue props id=$b name={PSOLID$a}
*setvalue props id=$b materialid={mats [lindex $materials $c]}
lappend Psolid PSOLID$a
incr a
incr b
incr c
}

*createentity props cardimage=PSOLID includeid=2 name=property1
*createmark properties 1 "property1"
*clearmark properties 1
*setvalue props id= [expr {$nbcouches + 1 }] name=PSOLID_Barresfroides
*setvalue props id= [expr {$nbcouches + 1 }] materialid={mats $idmatbfr}
*createentity props cardimage=PSOLID includeid=2 name=property2
*createmark properties 1 "property2"
*clearmark properties 1
*setvalue props id= [expr {$nbcouches + 2 }] name=PSOLID_Barreschaudes
*setvalue props id= [expr {$nbcouches + 2 }] materialid={mats $idmatbch}
*createentity props cardimage=PSOLID includeid=2 name=property3
*createmark properties 1 "property3"
*clearmark properties 1
*setvalue props id= [expr {$nbcouches + 3 }] name=PSOLID_Corband
*setvalue props id= [expr {$nbcouches + 3 }] materialid={mats $idmatcorb}

Answers

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited December 2022

    It looks like you are setting the card image correctly so maybe the solver interface isn't set correctly.

    Try using *templatefileset to set the solver interface.

    You can check the command#.tcl file for the correct path.

    For OptiStruct on my machine this was the command used:

    *templatefileset "C:/Program Files/Altair/2022.1/hwdesktop/templates/feoutput/optistruct/optistruct"

  • Chloé paolpi
    Chloé paolpi Altair Community Member
    edited December 2022

    J'ai essayé cela ne fonctionne toujours pas voici ma ligne de code:

    *templatefileset "C:/Program Files/Altair/2019/templates/feoutput/optistruct/optistruct"
    *createstringarray 2 "HMBOMCOMMENTS_XML" "HMMATCOMMENTS_XML"
    *feoutput_singleinclude 2 "Core_3D3D3D.fem" "C:/Program Files/Altair/2019/templates/feoutput/optistruct/optistruct" "$lien/Core_3D3D3D.fem" 1 0 2 1 2

     

    Auriez-vous une autre solution?

    Merci

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited December 2022

    J'ai essayé cela ne fonctionne toujours pas voici ma ligne de code:

    *templatefileset "C:/Program Files/Altair/2019/templates/feoutput/optistruct/optistruct"
    *createstringarray 2 "HMBOMCOMMENTS_XML" "HMMATCOMMENTS_XML"
    *feoutput_singleinclude 2 "Core_3D3D3D.fem" "C:/Program Files/Altair/2019/templates/feoutput/optistruct/optistruct" "$lien/Core_3D3D3D.fem" 1 0 2 1 2

     

    Auriez-vous une autre solution?

    Merci

    Are you setting the template before you create the properties?  It should probably be the first thing you do after opening HyperMesh. Nothing else really sticks out to me.