<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=731245020-03012006><FONT face=Arial color=#0000ff
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=731245020-03012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=731245020-03012006><FONT face=Arial color=#0000ff size=2>You
can try the following COM based method:</FONT></SPAN></DIV>
<DIV><SPAN class=731245020-03012006><FONT face=Arial color=#0000ff size=2><SPAN
class=731245020-03012006><FONT face=Arial color=#0000ff size=2>HRESULT
ChildFCOs([out, retval] IMgaFCOs **pVal);<BR></FONT></SPAN></FONT></SPAN><SPAN
class=731245020-03012006><FONT face=Arial color=#0000ff size=2>to get info about
the rootobjects like this:</FONT></SPAN></DIV>
<DIV><SPAN class=731245020-03012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=731245020-03012006><FONT color=#0000ff><FONT color=#0000ff>
<P><FONT face=Arial size=2>void</FONT></FONT><FONT size=2><FONT face=Arial><FONT
color=#000000> CComponent::InvokeEx(CBuilder &builder,CBuilderObject *focus,
CBuilderObjectList &selected, </FONT><FONT
color=#0000ff>long</FONT></FONT><FONT face=Arial color=#000000> param)
</FONT></FONT></P>
<P><FONT face=Arial size=2>{</FONT></P>
<P><FONT face=Arial size=2>CBuilderFolder * myFolder =
builder.GetRootFolder();</FONT></P>
<P><FONT face=Arial size=2>CComPtr<IMgaFolder> comFolderPtr =
myFolder->GetIFolder();</FONT></P>
<P><FONT face=Arial size=2>CComPtr<IMgaProject> comProjPtr =
builder.GetProject();</FONT></P>
<P><FONT face=Arial size=2>CComPtr<IMgaFCOs> childCollPtr;</FONT></P>
<P><FONT face=Arial size=2>comFolderPtr->get_ChildFCOs(
&childCollPtr);</FONT></P>
<P><FONT size=2><FONT face=Arial>long</FONT><FONT face=Arial>
cnt;</FONT></FONT></P>
<P><FONT face=Arial size=2>childCollPtr->get_Count( &cnt);</FONT></P>
<P><FONT size=2><FONT face=Arial>for( long</FONT><FONT face=Arial> l = 1; l
<= cnt; ++l)</FONT></FONT></P>
<P><FONT face=Arial size=2>{</FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=731245020-03012006> </SPAN>CComPtr<IMgaFCO>
child;</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=731245020-03012006> </SPAN>childCollPtr->get_Item( l,
&child);</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=731245020-03012006> </SPAN>CComBSTR
nm;</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=731245020-03012006> </SPAN>child->get_Name(
&nm);</FONT></FONT></P>
<P><FONT color=#008000><FONT face=Arial size=2>// ...</FONT></P></FONT>
<P><FONT face=Arial size=2>}</FONT></P>
<P><SPAN class=731245020-03012006><FONT face=Arial
size=2>}</FONT></SPAN></P></FONT></SPAN></DIV>
<DIV><SPAN class=731245020-03012006><FONT face=Arial color=#0000ff size=2>br,
Zoli</FONT></SPAN></DIV>
<DIV><SPAN class=731245020-03012006><FONT face=Arial color=#0000ff
size=2> </DIV></FONT></SPAN>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
gme-users-bounces@list.isis.vanderbilt.edu
[mailto:gme-users-bounces@list.isis.vanderbilt.edu] <B>On Behalf Of </B>Jane
Lin<BR><B>Sent:</B> Tuesday, January 03, 2006 1:32 PM<BR><B>To:</B>
gme-users<BR><B>Subject:</B> [gme-users] How to find out an atom within a
folder?<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have a GME plug-in written in C++ with BON
(not BONII). Now I am going to add a new function to support finding an atom
from a folder, which only contains atoms (no models). When I looked into the
APIs in Builder.h, I tried to use the GetRootObjects method in the
CBuilderFolder class. But it looked like this method doesn't return any atom
within such a folder.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Can I have another way to implement this, i.e.,
finding an atom from a folder?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jane</FONT></DIV>
<DIV><FONT face=Arial
size=2>---------------------------------------------------------------------------------<BR>Yuehua
(Jane) Lin<BR>Department of Computer and Information Sciences<BR>University of
Alabama at Birmingham<BR><A
href="mailto:liny@cis.uab.edu">liny@cis.uab.edu</A> <BR><A
href="http://www.cis.uab.edu/liny">http://www.cis.uab.edu/liny</A></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BLOCKQUOTE></BODY></HTML>