Hi all,
I have saved the state of a pipeline diffCP.pvsm where I have to two
CVSReader then two table to point, a delaunay2d, a resample and a
ProgrammableFilter to do the diff.
In the sample code attached below Im trying to change the two input file
name used in the CVSReader (Input1, Input2) and then run the pipeline to
get an immage.

But when I run this script the produced png is always referring to the
original two input files that where stored in the pvsm file no matter what
I put in inputFile1 or inputFile2. It's like if the InputFile property
doesn't get updated by my code.

I tried the code with both 3.6.2 and the trunk CVS of ~20 days ago.

Am I missing something?


Thanks for your help,
Luca

-------------------------------------------------------------------
servermanager.Connect()
servermanager.LoadState("diffCP.pvsm")
pm = servermanager.ProxyManager()
#changing input1 and input2 fileNames
for (pName, pId), pObject in pm.GetProxiesInGroup("sources").iteritems():
    if (pName == "Input1"):
        print "setting Input1 from " + str(pObject.FileName) + " to " +
        inputFile1
        pObject.FileName=inputFile1
        pObject.FileNameInfo=inputFile1
        pObject.UpdateProperty("FileName")
        pObject.UpdateProperty("FileNameInfo")
        #pObject.UpdatePipelineInformation
    elif (pName == "Input2"):
        print "setting Input2 from " + str(pObject.FileName) + " to " +
        inputFile2
        pObject.FileName=inputFile2
        pObject.FileNameInfo=inputFile2
        pObject.UpdateProperty("FileName")
        pObject.UpdateProperty("FileNameInfo")

view = servermanager.GetRenderView()
view.StillRender()
view.ViewSize=[1280,640]
view.WriteImage("diffCP.png", "vtkPNGWriter", 1)
_______________________________________________
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

Reply via email to