Finally I solved my problem.
The lines of code I used are as follows:
pqPipelineSource* myVRML;
myVRML=builder->createReader(QString("sources"),
QString("vrmlreader"),QStringList(temp), myServer);
myVRML->getProxy()->UpdateVTKObjects();
myVRML->setModifiedState(pqProxy::UNMODIFIED);
pqOutputPort* opPort = myBox->getOutputPort(0);
pqActiveView& myActiveView=pqActiveView::instance();
pqApplicationCore::instance()->getDisplayPolicy()->setRepresentationVisibility(opPort,myActiveView.current(),true);
With this I finally changed the status of my reader (Accept button not green
anymore) and rendered the object on the active view!
It works with filters as well,
:)
Thanks for your support
On Fri, Feb 6, 2009 at 4:49 PM, Juan Fernando Duque Lombana <
[email protected]> wrote:
> Using the following code:
>
> pqPipelineSource* myVRML;
> myVRML=builder->createReader(QString("sources"),
> QString("vrmlreader"),QStringList(temp), myServer);
> myVRML->getProxy()->UpdateVTKObjects();
> myVRML->setModifiedState(pqProxy::UNMODIFIED);
>
> The "Accept" button acts as if it is pressed! (not green anymore :) )
>
> In the render view, the object is not shown, BUT if i go to the object
> inspector in the GUI and press in the Display tab the Visible checkbox, the
> object is shown. Does anyone know how I can do that via c++ ?
>
>
> On Fri, Feb 6, 2009 at 3:53 PM, Moreland, Kenneth <[email protected]>wrote:
>
>> No (maybe someone else knows). You may try to just replicate the
>> method. The accept operation is not tied to any particular pipeline object;
>> it simultaneously updates all of them.
>>
>> -Ken
>>
>>
>> On 2/6/09 1:16 PM, "Juan Fernando Duque Lombana" <[email protected]>
>> wrote:
>>
>>
>> Thanks for your quick answer Ken, do you know a way to get the particular
>> instance of that object given a pipeline?
>>
>>
>> On Thu, Feb 5, 2009 at 5:38 PM, Moreland, Kenneth <[email protected]>
>> wrote:
>>
>> I don't know the answer to this question, but you may want to look at the
>> code for the pqObjectInspectorWidget::accept() method. This is the method
>> that gets called when you hit the Apply button.
>>
>> -Ken
>>
>>
>>
>> On 2/5/09 2:49 PM, "Juan Fernando Duque Lombana" <[email protected] <
>> http://[email protected]> > wrote:
>>
>> Good day,
>>
>> I'm a newbie in this big paraview world and I would like to know if
>> there's a way to do the following:
>>
>> I'm trying to load a VRML 2.0 file using the following command:
>>
>>
>> myVRML=builder->createReader(QString("sources"),
>> QString("vrmlreader"),QStringList(temp), s);
>>
>> Where temp contains the filename and s the pqServer.
>> The VRML is now shown in the pipeline browser BUT it is needed for me to
>> press by hand the "Accept" button in the correspondant Object Inspector.
>>
>> The question is: is there any way to call that button by code? I haven't
>> found a way and its killing me.
>>
>> Hope anyone can help me! It will be really appreciated,
>>
>> ... Juan Fernando Duque Lombana.
>>
>>
>>
>> **** Kenneth Moreland
>> *** Sandia National Laboratories
>> ***********
>> *** *** *** email: [email protected] <http://[email protected]>
>> ** *** ** phone: (505) 844-8919
>> *** web:
>> http://www.cs.unm.edu/~kmorel<http://www.cs.unm.edu/%7Ekmorel><
>> http://www.cs.unm.edu/%7Ekmorel>
>>
>>
>>
>>
>>
>> **** Kenneth Moreland
>> *** Sandia National Laboratories
>> ***********
>> *** *** *** email: [email protected]
>> ** *** ** phone: (505) 844-8919
>> *** web:
>> http://www.cs.unm.edu/~kmorel<http://www.cs.unm.edu/%7Ekmorel>
>>
>>
>
>
> --
> ... Juan Fernando Duque Lombana.
>
--
... 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