[gme-users] How to find out an atom within a folder?

Zoltan Molnar zolmol at isis.vanderbilt.edu
Tue Jan 3 15:19:43 CST 2006


Hi,
 
You can try the following COM based method:
HRESULT ChildFCOs([out, retval] IMgaFCOs **pVal);
to get info about the rootobjects like this:
 
void CComponent::InvokeEx(CBuilder &builder,CBuilderObject *focus,
CBuilderObjectList &selected, long param) 

{

CBuilderFolder * myFolder = builder.GetRootFolder();

CComPtr<IMgaFolder> comFolderPtr = myFolder->GetIFolder();

CComPtr<IMgaProject> comProjPtr = builder.GetProject();

CComPtr<IMgaFCOs> childCollPtr;

comFolderPtr->get_ChildFCOs( &childCollPtr);

long cnt;

childCollPtr->get_Count( &cnt);

for( long l = 1; l <= cnt; ++l)

{

    CComPtr<IMgaFCO> child;

    childCollPtr->get_Item( l, &child);

    CComBSTR nm;

    child->get_Name( &nm);

// ...

}

}

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 Jane
Lin
Sent: Tuesday, January 03, 2006 1:32 PM
To: gme-users
Subject: [gme-users] How to find out an atom within a folder?


Hi,
 
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.
 
Can I have another way to implement this, i.e., finding an atom from a
folder?
 
Thanks,
 
Jane
------------------------------------------------------------------------
---------
Yuehua (Jane) Lin
Department of Computer and Information Sciences
University of Alabama at Birmingham
liny at cis.uab.edu 
http://www.cis.uab.edu/liny
 
 

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


More information about the gme-users mailing list