TCL command of auto contact pair finding?
Hi everyone,
I have problem obtaining the TCL command of auto contact pair finding.
My model contains 6 components, I use the Abaqus contact manager to automatically find contact pairs for me.
Manually, I can successfully find contact pairs. Since I want to run this process automatically by TCL script, I do the process manually and check out the code added in the command.cmf file.
Unfortunately, the code are very long, approximately 50000 lines. Also, the code are about nodes' data and surface set, which is not I am looking for.
I am looking for the command that represents the buttons 'auto', 'components: all', 'find', 'create'. I will show these buttons in the figures attached.
By the way, the file: raw.hm is my model. Again, my goal is to get the TCL code for finding contact pairs.
Please help me, thanks!
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
Answers
-
Hi,
looking for relevant code in scripts folder and find what you need:
#open contact manager
source [file join [hm_info -appinfo SPECIFIEDPATH hm_scripts_dir] abaqus Contact_wizard CW.tcl]
#open autocontact
::autocontact::CWautocontact::AutoContactGui
#invoke selecting components>all
*createmark comps 1 all set ::autocontact::CWautocontact1::newElems [hm_getmark comps 1] ::AbaqusCW::HighLight off if {$::autocontact::CWautocontact::flag==1} { set ::autocontact::CWautocontact::flag 0 } if {[llength $::autocontact::CWautocontact1::newElems]} { ::autocontact::CWautocontact1::AddCompsToTable }
# set proximity distance
set ::autocontact::CWautocontact1::proximity_entry 5.0
# invoke 'Find' button
::autocontact::CWautocontact::UpdateInterface
0 -
Thanks a lot! It's really a great help to me.
I have one more question. How can I know which TCL file contains those command code.
There are a bunch of TCL files in scripts folder. Is there a way to find the command of a button?
At the moment, I just manually search through every file that I think the command should be. It's kind of time consuming.
0 -
There are some ways to find command bound to a tk button.
but you may make hm hanging. So go to scripts folder and parse tcl files is better way
I will not reveal them, it is safer for you /emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />
once you become knowledgeable about tcl, you'll find it easily
0 -
I have another question. How to invoke the ''create ' button.
I found the command of 'create' button inside the autocontact_tab.tcl file.
The command is '::autocontact::CreateEntities $T', but it doesn't work.
the command window give me an error message reads as follows: can't read 'T': no such variable
0 -
Hi,
T is data tree, it's a tk widget.
try command:
::autocontact::CreateEntities .autocontactGui.outer_frame.results_tree
0 -
Dear @tinh
How to get this ABAQUS CONTACT MANAGER table whole data and play around this.
like getting the details where it is tied or not.
Other thing is i need full tabular data.
Best Regards,
Vikas Kumar
0 -
hi
set ::AbaqusCW::CWcontactpair2::tiedCbox
array get ::AbaqusCW::CWcontactpair1::table_arraySurf
0 -
Altair Forum User said:
hi
set ::AbaqusCW::CWcontactpair2::tiedCbox
array get ::AbaqusCW::CWcontactpair1::table_arraySurf
I need this table all values
which is not coming by using array get ::AbaqusCW::CWcontactpair1::table_arraySurf
My code is
source [file join [hm_info -appinfo SPECIFIEDPATH hm_scripts_dir] abaqus Contact_wizard CW.tcl]
#open autocontact
array set tableData [array get ::AbaqusCW::CWcontactpair1::table_arraySurf]#creating own array
foreach index [array names tableData] {
puts 'index: $index '
puts 'arr: tableData($index): val: $tableData($index) '# Printing Data
}
puts 'END'Thanks,
Vikas Kumar
0 -
Hi
It is
array get ::AbaqusCW::cwNonSurArray
0 -
Hello,
Could someone send similar code for Auto Contact for Optistruct profile? I mean this:
0