Jump to content
  • Announcements

    • Rahul Ponginan

      Please click here for a short but important announcement   03/26/17

      Dear Users Our Commercial and Academic users around the world can use these same forums here as before i.e. the Altair Support Forum , Commercial users from India with solver queries can go to the Solver Forum for India Commercial Users , Academic Users from India and AOC India Participants are requested to go to the Forum for India Academic Users and AOC India Participants , We will be tending to all queries in all the forums promptly as before, thank you for your understanding. 

Recommended Posts

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!

 

1.PNG

2.PNG

3.PNG

4.PNG

raw.hm

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

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 ;)

once you become knowledgeable about tcl, you'll find it easily

 

Share this post


Link to post
Share on other sites

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

 

 

5.thumb.PNG.7bdba50cb32cb15c7db4cd2b37eea7d9.PNG

Share this post


Link to post
Share on other sites

Hi,

T is data tree, it's a tk widget.

try command:

::autocontact::CreateEntities .autocontactGui.outer_frame.results_tree

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×