[Paraview] Fwd: Getting proxy names from proxy manager.

Juan Fernando Duque Lombana jduquelo at eafit.edu.co
Thu Feb 19 08:58:05 EST 2009


Thank you, this was an oldie I found my way around :),
Instead of finding registered proxies and checking if their representation
existed, I used the pipelines and iterated over their properties with an
iterator.

Thanks!


On Thu, Feb 19, 2009 at 8:54 AM, Utkarsh Ayachit <
utkarsh.ayachit at kitware.com> wrote:

> The cout is never shown since GetProxyName() returns 0 for the second
> time around. A cleaner alternative would be to use the
> vtkSMProxyIterator to iterate  over a group (using
> iter->Begin("sources")).
>
> Utkarsh
>
> On Wed, Feb 11, 2009 at 4:29 PM, Juan Fernando Duque Lombana
> <jduquelo at eafit.edu.co> wrote:
> > Using the following c++ code:
> >
> > myBox=builder->createSource("sources", "CubeSource", s);
> > myBox->rename(QString("VWTBoundary"));
> > myBox->setModifiedState(pqProxy::UNMODIFIED);
> > pqOutputPort* opPort = myBox->getOutputPort(0);
> > builder->createDataRepresentation(opPort,myActiveView.current());
> >
> > I've been able to create an unitary box named in my pipeline
> "VWTBoundary" .
> >
> > Using the following code:
> >
> >        vtkSMProxyManager *pxm = vtkSMProxyManager::GetProxyManager();
> >        cout << "RUNNING" << endl;
> >        unsigned int nproxies=pxm->GetNumberOfProxies("sources");
> >         cout << "Nproxies: " << nproxies << endl;
> >         for(unsigned int i =0; i < nproxies; i++)
> >         {
> >                 vtkSMProxy *proxy = pxm->GetProxy("sources",i);
> >                 cout << pxm->GetProxyName("sources",i) << endl;
> >         }
> >         cout << "FINNISHING"<< endl;
> >
> > I'm suppously able to get the proxy names of the group "sources".
> >
> > The question is as follows:
> >
> > When I generate a single box, the code works flawlessly. When I have 2
> > proxies with the same name on the pipeline, the code doesn't seems to
> finish
> > (I never get the last cout output).
> > Any Ideas?
> >
> > Thanks in advance!
> >
> > ... Juan Fernando Duque Lombana.
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the ParaView Wiki at:
> > http://paraview.org/Wiki/ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.paraview.org/mailman/listinfo/paraview
> >
> >
>



-- 
... Juan Fernando Duque Lombana.



-- 
... Juan Fernando Duque Lombana.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090219/26f78116/attachment-0001.htm>


More information about the ParaView mailing list