Jump to content

vipin

Members
  • Content Count

    108
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. MOHAMMED ABDULLA T liked a post in a topic by vipin in Find and delete elements that fail validity check   
    Hi @etrud011,
     
    you can record the command using F10 panel and use it accordingly, for example
     
    *createmark elements 1 "displayed"
    *createmark elements 2
    *elementtestjacobian elements 1 0.7 2 2 0 "  2D Jacobian  "
    *deletemark elems 2
  2. vipin liked a post in a topic by Pandurang in Find and delete elements that fail validity check   
    *createmark elems 1 displayed
    hm_getelementsqualityinfo 1 0 2;
    *deletemark elems 2
  3. Pandurang liked a post in a topic by vipin in Find and delete elements that fail validity check   
    Hi @etrud011,
     
    you can record the command using F10 panel and use it accordingly, for example
     
    *createmark elements 1 "displayed"
    *createmark elements 2
    *elementtestjacobian elements 1 0.7 2 2 0 "  2D Jacobian  "
    *deletemark elems 2
  4. pohan liked a post in a topic by vipin in how to read a csv file and create nodes from coordinates   
    @pohan
    add this line so that by default it will take script directory.
    set dir [file dir [info script]]
  5. vipin liked a post in a topic by tinh in Automating *ossmooth_12   
    Hi
    before this last command, you need hm_answernext yes , too:
    *ossmooth_savesurf 1 "$newfile" $unit 7
  6. vipin liked a post in a topic by Toan Nguyen in Find nodes assigned to a system   
    hi @tinh @vipin
     
    It works now, I forgot to set up a User Profiles.
     
    Thank you very much for the help from all of you!
  7. Toan Nguyen liked a post in a topic by vipin in Find nodes assigned to a system   
    Hi @Toan Nguyen
    this could work for you.
     
    set sysId 1
    hm_getcrossreferencedentities systems $sysId 7 1 0 0 -byid
    hm_getmark nodes 1
  8. tinh liked a post in a topic by vipin in Find nodes assigned to a system   
    Hi @Toan Nguyen
    this could work for you.
     
    set sysId 1
    hm_getcrossreferencedentities systems $sysId 7 1 0 0 -byid
    hm_getmark nodes 1
  9. vipin liked a post in a topic by 0815 in Solid face selection panel   
    Hi all,
     
    I used this commands:
     
    *createmark elements 1 "ComponentName"
    *createmark nodes 1 "by sets" "SetName"
    *interfaceaddsolidface "YourGroupeName" 0 1 1 30
     
    But keep in mind, you will have to create a node set first, if you want to use this commands.
     
    hope this is an answer to your question!
     
    regards,
    0815
     
  10. vipin liked a post in a topic by tinh in Solid face selection panel   
    I know that the panel is called by hm_private_eemarkorlistpanel
    But i am not sure how it works
     
    Why do you need to call this panel?
    I think finally it will invoke some * commands as @0815 shows above
    So you can use them directly, hooking to GUI is just effective in some cases
  11. vipin liked a post in a topic by tinh in Solid face selection panel   
    Hi Vipin
    try
    ::hwtk::pa::Area::multiCollectorEditor12 OnYellow
  12. alexdonner liked a post in a topic by vipin in How to use query commands   
    Not sure about any direct command for shared elements.
    But you can use  *findmark  to find elements attached to nodes(since you already have nodes from previous command). 
  13. vipin liked a post in a topic by Livil Lyle in Querying about some element for 1D- stress value   
    Hi Vikas,
    You can pass the element Ids you want to the below procedure:
     
    proc contourValue {lst_elements} {
        hwi OpenStack
            set t [clock clicks]
            hwi GetSessionHandle session$t
            session$t GetProjectHandle project$t
            project$t GetPageHandle page$t 1
            page$t GetWindowHandle win$t 1
            win$t GetClientHandle anim$t
            anim$t GetModelHandle my_model$t [anim GetActiveModel]
            my_model$t GetQueryCtrlHandle my_query$t
            set set_id [my_model$t AddSelectionSet element]
            my_model$t GetSelectionSetHandle elem_set$t $set_id
            foreach id $lst_elements {
                elem_set$t Add "id $id"
            }
            my_query$t SetSelectionSet $set_id
            # my_query$t SetQuery "element.id contour.value";
            my_query$t SetQuery "contour.value"; #only contour value
            my_query$t GetIteratorHandle my_iter$t
            set data_list ""
            for {my_iter$t First} {[my_iter$t Valid]} {my_iter$t Next} {
            lappend data_list [my_iter$t GetDataList]
            }
            puts "$data_list----data_list";
            my_model RemoveSelectionSet $set_id
        hwi CloseStack
    }

    Regards
    llyle
  14. vipin liked a post in a topic by tinh in Selection of specific 1-D element   
    Hi,
    for config numbers, you can look it up in Hypermesh reference help, topic "Data Names" > elements
  15. tinh liked a post in a topic by vipin in Error Running in Batch Mode   
    Hi Alec,
     
    1. you can add this line to your tcl file
    hm_framework loaduserprofile OptiStruct ""
     
    2. From the error you got, i think this data name "OS_SPCID" is something specific to optistruct
  16. vipin liked a post in a topic by 0815 in How to remove nodes from a set by usage of tcl   
    hi vipin,
     
    it works
     
    Thanks for your support!
  17. 0815 liked a post in a topic by vipin in How to remove nodes from a set by usage of tcl   
    Hi tomislav
    try this
     
    *createmark nodes 1 "by set" NSET
    *createmark nodes 2 "by box" $x1 $y1 $z1 $x2 $y2 $z2 0 inside 0 1 0
    *markdifference nodes 1 nodes 2
    *entitysetupdate "NSET" nodes 1
  18. tinh liked a post in a topic by vipin in How to remove nodes from a set by usage of tcl   
    Hi tomislav
    try this
     
    *createmark nodes 1 "by set" NSET
    *createmark nodes 2 "by box" $x1 $y1 $z1 $x2 $y2 $z2 0 inside 0 1 0
    *markdifference nodes 1 nodes 2
    *entitysetupdate "NSET" nodes 1
  19. tlewis3348 liked a post in a topic by vipin in What is the difference between the major axis and normal vectors in the *solidcone command?   
    Hi tlewis,
     
    I think mvec will only matter if you are creating an elliptical cylinder(direction b in this image).
    Create a node using the mvec coordinates you got from command.tcl, it will give you some idea.

  20. tinh liked a post in a topic by vipin in Find nearby surfaces   
    Hey @tinh  Thank you so much!!
    problem solved.
     
  21. vipin liked a post in a topic by tinh in Find nearby surfaces   
    No no Vipin, a critical bug at the second "hm_collisionentitycreate", the last argument must be "2" instead of "1"
     
    it is group id of surfs that will be pushed into hm_collisioncheck
     
    I test your model, it return surfs 4 9 3 2,  (thickness option 10 or 30 are all OK)
     
    please try again and announce me
     
  22. vipin liked a post in a topic by tinh in Adding buttons to the Utility Menu without administrator access   
    It's because you put your code within this condition
    so if hm is not running in debug mode, you will not see your button
     
    //{ if ( getenv("HM_DEBUG") == "ON" ) }
  23. Sahithya liked a post in a topic by vipin in Adding buttons to the Utility Menu without administrator access   
    Move your custom macros under 
    // User Page Macro Definitions it will appear.
     
     
     
     
    // HWVERSION_2017.2_Jul 25 2017_20:5:5
    /////////////////////////////////////////////////////////////////////////////// 
    // Filename: userpage.mac
    // Purpose:  Macro menu 'User' page definitions.
    // Version:  HyperWorks
    // Altair Copyright:
    /////////////////////////////////////////////////////////////////////////////// 
     
    //    User Page Widget Definitions
    //
    //    Note: Since relative row locations are used, the menu page is built from
    //          the bottom up.
    //
    //    The following templex test is used to see if the Tcl support buttons
    //  should be added.
    //{ if ( getenv("HM_DEBUG") == "ON" ) }
        *createbutton(5, "TkCon ...",   -1, 0, 10, BUTTON, "Launch the Tk Console.", EvalTcl, "tkcon.tcl")
        *createbutton(5, "GUI Toolkit ...", -1, 0, 10, BUTTON, "Launch the GUI Toolkit.", LaunchWidgetTour)
        *createbutton(5, "ProDebug", 0, 0, 10, BUTTON, "Connect to the TclPro debugger.", ConnectToDebugger)
    //{ endif }

    //    User Page Macro Definitions
    *createbutton(5, "Add Washer", -1, 0, 10, BUTTON, "Adds a washer to the existing hole in the mesh.", "EvalTcl", "macroAddWasher.tcl")
    *createbutton(5,"SaveFile TCL",-1,0,10,GREEN,"Save file using TCL macro", "EvalTcl","E:\vipin\savefile.tcl")
    ///////////////////////////////////////////////////////////////////////////////
    *beginmacro("ConnectToDebugger")
        //  Purpose:    To connect to a remotely running ProDebug session.
        // 
        //  Note:          The pathname to the 'prodebug.tcl' script may need to be 
        //                modified to    reflect your installation of TclPro.
        *evaltclstring("source /Program\ Files/tclPro1.4/win32-ix86/bin/prodebug.tcl; debugger_init;",0)
    *endmacro()
    ///////////////////////////////////////////////////////////////////////////////
    *beginmacro("LaunchWidgetTour")
        //  Purpose:    Launch the HyperWorks Widget Tour dialog.
         *evaltclstring("::hwt::WidgetTour",1)
    *endmacro()
  24. vipin liked a post in a topic by Imoto in Splitting CAD file   
    Hi Vipin
     
    You can use "by block" option in *createmark.
    Here is sample code.
     
    set blockname [::hwat::utils::GetUniqueName block "Dummy"];
    *createsimpleblock $blockname 11 -100000 -100000 0.5 100000 100000 100000;
    *createmark surfs 1 "by block name" $blockname;
    *numbersmark surfaces 1 1;
    *createmark blocks 1 "by name only" $blockname;
    *deletemark blocks 1;
     
    Thanks,
    Imoto
×
×
  • Create New...