Jump to content

Sagar Motwani

Members
  • Content Count

    18
  • Joined

  • Last visited

Posts posted by Sagar Motwani


  1. Hey Tinh and others as well,

    Thanks for helping everyone in the field of automation. 
    I have query which is extended version of above query

    Since, I had already developed a GUI using tab feature. But, due to its use on another machine (with changed screen resolution), the buttons at bottom are hidden. So I decided to add scrollbar. But no success.

     

    Earlier My code was this -

        
        catch {hm_framework removetab "Test-Group A"
        destroy .main}
        
        set main [ frame .main ]
        hm_framework addtab "Test-Group A" $main
        hm_framework resizetab "Test-Group A" 440 
        
        
        frame $main.main_frame -height 550 -width 450 -bg "#C5E1A5"
        grid $main.main_frame -row 0 -column 0 -sticky w -padx 0 -pady 0
        
            image create photo imgobj0 -file "$::script_address\JarFiles/Image/Test_Logo_222.png" -width 450 -height 130
            label $main.main_frame.label0 -bg "black"
            grid $main.main_frame.label0 -row 0 -column 0 -sticky w -padx 0 -pady 2 -columnspan 2
            $main.main_frame.label0 configure -image imgobj0

     

    ... and so on (includes Labels, entries, buttons in vertical layout)

     

    After implementing scrollbar and related parent frame, canvas and child frame- 

     

        catch {hm_framework removetab "Test-Group A"
        destroy .main}
        
        set fmain [ frame .main ]
        hm_framework addtab "Test-Group A" $fmain
        hm_framework resizetab "Test-Group A" 440 
        
        #set up scrollable frame

        set frmparent [frame $fmain.frmparent -width 450 -height 500 ]
        set canvas1 [canvas $frmparent.canvas1 -width 553 -height 600 -xscrollcommand "$frmparent.hscroll set" -width 523 -height 500 -yscrollcommand "$frmparent.vscroll set"]
        set main [frame $canvas1.frmscrolled]

        # package require BWidget

        # ScrollableFrame $frmparent

        # set frmscroll [$frmparent getframe]

        set hscroll [scrollbar $frmparent.hscroll -orient h -command "$canvas1 xview"]
        
        set vscroll [scrollbar $frmparent.vscroll -orient v -command "$canvas1 yview"]

        pack $frmparent.hscroll -side bottom -fill x
        pack $frmparent.vscroll -side right -fill y
        pack $canvas1 -expand yes  -side top
        

        $canvas1 create window 0 0 -anchor nw -window $main 

        $canvas1 configure -scrollregion [$canvas1 bbox all]
        
        pack $frmparent -expand yes -fill both -side top
        
        
        frame $main.main_frame -height 550 -width 450 -bg "#C5E1A5"
        grid $main.main_frame -row 0 -column 0 -sticky w -padx 0 -pady 0
        
            image create photo imgobj0 -file "$::script_address\JarFiles/Image/Test_Logo_222.png" -width 450 -height 130
            label $main.main_frame.label0 -bg "black"
            grid $main.main_frame.label0 -row 0 -column 0 -sticky w -padx 0 -pady 2 -columnspan 2
            $main.main_frame.label0 configure -image imgobj0

     

    ... and so on (includes Labels, entries, buttons in vertical layout)

     

    But it seems to not work.

     

    Thanks,

     


  2. Hi,

    When I am trying to automate meshing in SimLab for .slb file, it is asking for Geom file (.x_t) which is kept in same folder as .slb and even .slb file contains only Geometry (imported CAD from the same parasolid file).

     

    Now, I am left with two option -

     

    1. Either automating >> directly importing parasolid file. > Renaming each component and then meshing. (which is more time consuming than 2nd option).

    2. Importing .slb file >> giving Geom file > then meshing. (lesser time consuming than 1st )

     

    But the problem with second option is, I dont know how to auto feed Geom file, initially only or in code. 

     

    If this whole process runs in graphic mode, it will pause and ask to select Geom file.

    But, if it is nographics (batch mode) the simlab goes non responding, until it is killed by task manager.


  3. Hi,

    For selecting nodes by path, I have tried >>

    *nodelistbypath $node1 $node2 1

    *entitysetcreatelist temp_nodes nodes 1

    But this works only for a open path or shortest path from node1 to node2 in closed loop.

    Please help me in above matter for selecting all nodes on a path.

    P.S. I have a line with its ID  on that path. For any idea related to nodes on that line. And, I don't want to go with -->

    *nodelistbypath $node1 $node_mid_path 1

    *nodelistbypath $node_mid_path $node2 2

    >>Union 1 and 2<<

    *nodelistbypath $node2 $node1 2

    >>Union 1 and 2<<


  4. Can some would suggest me script for read and write all the subcase names and their respective ids, for now to get all subcases names, I am using-

    hwi GetSessionHandle mySessionName

    mySessionName GetDataFileHandle myDataFile $op2File
        
    set subcase_list [myDataFile GetSubcaseList] 
    puts "subcase_list $subcase_list"

     

    can some suggest script or code to find all Subcases ids with minimal changes in above.


  5. Can some would suggest me script for read and write all the subcase names and their respective ids, for now to get all subcases names, I am using-

    hwi GetSessionHandle mySessionName

    mySessionName GetDataFileHandle myDataFile $op2File
        
    set subcase_list [myDataFile GetSubcaseList] 
    puts "subcase_list $subcase_list"

     

    can some suggest script or code to find all Subcases ids with minimal changes in above.


  6. Hi George,

    My script is for selecting some bad (nearby/ attached) surface elements on same plane, moving it to Temp component/ collector and then remeshing those edges nodes using Spline option in 2D Panel. When, I delete that Temp Component at the end, I am getting Segmentation Error. I tried deleting setting files, seems to not work out. Still getting, Segmentation Error when I delete that Temp Component, using "*deletemark components 1".

     

    Thanks,

    SAGAR 


  7. I have come across "Segmentation Error" in my script. Script is for seleting particular surface elements and remeshing it with Spline option, and deleting prev. elements on user satisfaction. The script seems to be fine in context of Syntax and API uses. It would be helpful, if someone could tell me the common causes for this error. And, better, if someone could suggest solution to this problem. We thought it as error caused due to memory limitation. So, we have also used *clearmark every now and then. But, seems to not affect that much.

     

    Thanks,

     

    SAGAR MOTWANI


  8. What does "atta" and "attb" (attribute no. 5 and 6) in HM api "*optiresponsecreate", are for ? The forum at 'http://10.132.22.249/altair2017/help/hm_ref_guide/topics/reference/hm/_optiresponsecreate.htm' is showing "atta" and "attb" are - "The attributes of a response". Can someone explain me in detail about that ? Or how to get and use those attributes of api "*optiresponsecreatein a TCL script.

×
×
  • Create New...