🎉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

create material in batch mode

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

Hi everyone;

 

is there anyway to create material in batchmesher or how can i create material in batch mode? i using this tcl code; 

*collectorcreateonly materials 'steel' '' 5
*setvalue mats id=1 cardimage='MAT1'
*setvalue mats id=1 STATUS=1 1=210000
*setvalue mats id=1 STATUS=1 2=80769.2
*setvalue mats id=1 STATUS=1 3=0.3
*setvalue mats id=1 STATUS=1 4=7.85e-009

 

and i getting this error

Error:  Value is not modified successfully
0
    while executing
'*setvalue mats id=1 cardimage='MAT1''
    (file 'Z:/..../d2.tcl' line 18)
    invoked from within
'source Z:/..../d2.tcl'
End of command file - terminating.
HM exiting with code 1

 

i tried so much things but i coudnt find any solution. Can anyone help me? 

 

Thanks, kind regards

Ridvan

 

Find more posts tagged with

Sort by:
1 - 6 of 61
    User: "tinh"
    Altair Community Member
    Updated by tinh

    You have to load template by *templatefileset, before using *setvalue

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

    Hi Tinh;

     

    Thank you for your help. But it didnt work. i used command.tcl file to create my script and i am tring it in batch mode. i think thats my mistake. Can you take a look at it? if whole structure is a mess, i will try to rewrite again. 

     

    Ridvan

    Unable to find an attachment - read this blog

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Please post your code here. My phone cannot open tcl file

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

    *templatefileset 'C:\Program Files\Altair\2017\templates\feoutput\hm\general'
    *linecreatestraight 0 0 0 150 0 0
    *window 0 0 0 0 0
    *beamsectioncreatestandardsolver 7 0 'HMTube' 0
    *createmark beamsects 1
    *updatehmdb beamsects 1
    *beamsectionsetdataroot 1 1 0 2 7 1 0 1 1 0 0 0 0
    *createdoublearray 6 10 4 4 12 5 5
    *beamsectionsetdatastandard 1 6 1 7 0 'HMTube'
    *createmark beamsects 1 'boru'
    *updatehmdb beamsects 1
    *createmark beamsects 1
    *updatehmdb beamsects 1
    *settopologydisplaymode 0
    *centroid1dmode 0


    *collectorcreateonly materials 'steel' '' 5
    *setvalue mats id=1 cardimage='MAT1'
    *setvalue mats id=1 STATUS=1 1=210000
    *setvalue mats id=1 STATUS=1 3=0.3
    *setvalue mats id=1 STATUS=1 2=80769.2
    *setvalue mats id=1 STATUS=1 4=7.85e-009
    *collectorcreateonly properties 'st' '' 5
    *setvalue props id=1 cardimage='PBEAM'
    *setvalue props id=1 materialid={mats 1}
    *setvalue props id=1 STATUS=2 3186={beamsects 1}

    *elementsizeset 10
    *createmark lines 1 1
    *linemesh_preparedata1 lines 1 0 60
    *linemesh_saveparameters 0 15 0 0
    *createvector 1 1 0 0
    *linemesh_savedata_bar1 lines 1 60 1 1 0 0 0 0 0 0 1 0

    *setvalue comps id=1 propertyid={props 1}

    *collectorcreateonly loadcols 'spc' '' 5
    *createmark nodes 1 1
    *loadcreateonentity_curve nodes 1 3 1 0 0 0 0 0 0 0 0 0 0 0
    *collectorcreateonly loadcols 'load' '' 5
    *createmark nodes 1 16
    *loadcreateonentity_curve nodes 1 1 1 0 100 0 0 0 100 0 0 0 0 0


    *loadstepscreate 'static' 1
    *setvalue loadsteps id=1 STATUS=2 4059=1
    *setvalue loadsteps id=1 STATUS=2 4060='STATICS'
    *setvalue loadsteps id=1 ids={loadcols 1-2}
    *feoutputwithdata 'C:/Program Files/Altair/2017/templates/feoutput/optistruct/optistruct' 'Z:/analiz_otomasyon/d3/d2.fem' 0 0 2 1 2

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Change \ to /

    Why don't you load optistruct template?

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

    Thanks Tinh. i always forget to change \ to /. And i loaded both optistruct.