The problem of tcl command "*calculateElemDrapingAngles"

mansin
mansin Altair Community Member
edited October 2020 in Community Q&A

Hi, everyone.

    I encountered a problem when I record tcl command of 'Drape Estimator' in the GUI. In command.tcl file, it gives the the command:

*calculateElemDrapingAngles 1 './draping1001/draping1001.res' 'DrapeTable_PLY1001' 1 2 1001

    While in the help files, the explanation of the command of '*calculateElemDrapingAngles' is

*calculateElemDrapingAngles mark_id result_file table_name fiber_vector stamping_vector ply_id

result_file: Reserved for future use.  Must be set to ''.

 (1) How is the result file './draping1001/draping1001.res'  generated? (the generation process of the result file was not recorded in the 'command.tcl' file )  What's the full directory path of the result file? (in HyperWorks 14.0)

 (2) The parameter of result_file in the command cannot be blank when executing this command. The software throws a error: A results file must be specified in the files panel. So, is there a problem with the explanation of the help files to this command?

 

Can anybody gives me some advices?

Thanks.

Answers

  • tinh
    tinh Altair Community Member
    edited June 2018

    Hi,

    Try loading a result file into hypermesh first (menu File>Load>Results)

    maybe the command will take a loaded result file as it argument, and temporary not permit user to indicate it arbitrary.

  • mansin
    mansin Altair Community Member
    edited June 2018

    Hi, tinh.

    I found the result file (.../draping****.res) was generated automatically in the work directory when executing 'Drape Estimator' function. But this result file was deleted automatically when the 'Drape Estimator' function was finished. I cannot run the recorded command.tcl file properly because the generated process of the result file (or directory) was not recorded in 'command.tcl' file and the drape results no longer existed. I guess the 'Drape Estimator' operation called an 'unkown' command to calculate the drape parameters before the command '*calculateElemDrapingAngles' executed, but I don't know which 'unknown' command is called. I would appreciate it if you could help me solve this problem.

    I attached the tested .hm file () and recorded command.tcl file () (only contained 'Drape Estimator' operation by right click on ply) and the catured picture about temporary drape results.  

    <?xml version="1.0" encoding="UTF-8"?>1.PNG

    Unable to find an attachment - read this blog

  • tinh
    tinh Altair Community Member
    edited June 2018

    Hi,

    What is 'Drape Estimator' function?

    where can I access it?

  • mansin
    mansin Altair Community Member
    edited June 2018

    Hi, tinh.

    You can execute draping function by right click on ply folder or each ply and select 'Drape Estimator' from context menu. 

    Thanks.

    <?xml version="1.0" encoding="UTF-8"?>blob.png

  • mansin
    mansin Altair Community Member
    edited July 2018

    tinh

        If you could help me to test this problem and give me some advices, I would appreciate it.

        Thanks.

     

    mansin.

     

  • tinh
    tinh Altair Community Member
    edited July 2018

    Hi, I will try it but currently, I am very busy, so please wait ... I am sorry.

  • mansin
    mansin Altair Community Member
    edited July 2018

    Hi, tinh.

         If you have time, can you test it for me?

    Thanks.

    Mansin.

  • tinh
    tinh Altair Community Member
    edited July 2018

    Hi

    I invoke 'Drape Estimator', it pops up a window named 'Drape Estimator'

    I click 'Apply', it runs, then a table is generated.

    But I don't see any command output to command.tcl file

    and I don't see any *.res file in working dir while it running, either.

     

    if your hm version is low, please update to v2017.2

     

    If you want to run drape estimator by script in v2017.2, the code is like this:

     

    set ::ply_ids $PlyID

    source [file join $hm_scripts_dir br views composite operations drapeestimator_perform.tcl]

    wm withdraw .drapeestimatorgui

    ::hm::plydraping::OnApply

    destroy .drapeestimatorgui

     

     

     

     

  • mansin
    mansin Altair Community Member
    edited July 2018

    Hi, tinh.

         

    Thank you very much for your reply and advices. The tcl codes can solve my problem.

    regards,

    Mansin

  • mansin
    mansin Altair Community Member
    edited August 2018

    Hi, tinh.

         I found the code you advised cannot be run in HyperStudy. It seems that the code cannot be recogonized by HyperStudy properly. How to solve this new problem?

        Thanks.

  • tinh
    tinh Altair Community Member
    edited August 2018

    Hi

    I don't know anything about hyperstudy, so please ask hyperstudy users

  • mansin
    mansin Altair Community Member
    edited August 2018

    tinh

    Okay, Thank you very much.

  • mansin
    mansin Altair Community Member
    edited August 2018

    tinh

    I run this code () in command window:

    'C:\Program Files\Altair\2017\hm\bin\win64\hmbatch.exe' -tcl 'E:\HyperWorks_Work\Drape_test\drape_test.tcl'

    Some errors are obtained:

    Error.PNG.769020593c72789e2d4fe0fe1d1e2a91.PNG

    How to solve this problem?

    Thanks.

    Unable to find an attachment - read this blog

  • tinh
    tinh Altair Community Member
    edited August 2018

    It does not work with batch mesh.

    Solution is to use hypermesh