[gme-users] How to get the value of a certain attribute

Zoltan Molnar zoltan.molnar at vanderbilt.edu
Mon Apr 12 11:16:14 CDT 2004


Hi,
Indeed the Attribute class right now doesn't have a getName method (future
improvement), but you can inquire its the name using the com interface given
by: AttributeImpl::getAttributeI()
like:
 
std::string getAttributeName( Attribute * myattribute )
{
  CComBSTR bstrName;
  COMTHROW( myattribute->getAttributeI()->get_Name( &bstrName ) );
  return Util::Copy( bstrName );
}
 
Br, Zoli

-----Original Message-----
From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Zhimin He
Sent: Sunday, April 11, 2004 1:35 PM
To: gme-users at list.isis.vanderbilt.edu
Subject: [gme-users] How to get the value of a certain attribute



I'm using BON2 that comes with GME 4.3.17. I can get the whole set of
attributes with Model->getAttributes. When I tried to iterate through the
set, I couldn't find the api to get an attribute's name. Is there something
similar to attribute->getname()?

Thx

Zhimin 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20040412/cbe5f504/attachment.htm


More information about the gme-users mailing list