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

Zoltan Molnar zolmol at isis.vanderbilt.edu
Tue Jan 3 16:59:43 CST 2006


Somebody suggested to me, that the BON1 code was written when folders
contained only models, so the bug is on our side, and i will have to
update the BON1 code.
Until then i can't suggest any easy way to convert from CComPTR to
CBuilderObject.
 
So i will send to you the fix as soon as it is available.
 
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 4:52 PM
To: gme-users
Subject: Re: [gme-users] How to find out an atom within a folder?


Thanks, it works. But how can I convert CComPtr<IMgaFCO> child to
CBuilderObject *  after I find it?
 
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
 
 

----- Original Message ----- 
From: Zoltan Molnar <mailto:zolmol at isis.vanderbilt.edu>  
To: gme-users <mailto:gme-users at list.isis.vanderbilt.edu>  
Sent: Tuesday, January 03, 2006 3:19 PM
Subject: RE: [gme-users] How to find out an atom within a folder?

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
 
 



  _____  




_______________________________________________
gme-users mailing list
gme-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users


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


More information about the gme-users mailing list