Page 1 of 1

mechanisms in a section?

Posted: Fri Jun 13, 2008 2:39 pm
by jaambros
Hi,
Is there a way to find out programatically the names of the mechanisms in a section?
I would of thought that the MechanismType class would have a function for this (it has one for point processes).
It does have some (count and select), but they refer to the available mechs, not the ones in a given section.

Thanks in advance,
Jose Ambros-Ingerson
Ohio University

Re: mechanisms in a section?

Posted: Fri Jun 13, 2008 3:36 pm
by jaambros
I figured out one way of doing this

Code: Select all

strdef mname
proc print_mechs(){ local i localobj mt
  mt = new MechanismType(0)
  for i=0, mt.count()-1 {
    mt.select( i )
    mt.selected( mname )
    if( ismembrane(  mname )) print mname
  }
}

Re: mechanisms in a section?

Posted: Fri Jun 13, 2008 8:46 pm
by ted
Thanks for posting that nice tip, Jose!