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

Jane Lin liny at cis.uab.edu
Thu Jan 5 10:51:44 CST 2006


MessageThanks for this fix. It works well.

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 
  To: gme-users 
  Sent: Wednesday, January 04, 2006 10:46 AM
  Subject: RE: [gme-users] How to find out an atom within a folder? [BON1Update]


  Attached the fix for the BON1 bug regarding children of folders. (Just replace the Builder.cpp file found in your SDK/BON directory).
  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 
      To: gme-users 
      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



------------------------------------------------------------------------------


  _______________________________________________
  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/20060105/dcaabe0e/attachment.htm


More information about the gme-users mailing list