[Paraview] How do you set LIC parameters in a python trace script?

Burlen Loring bloring at lbl.gov
Wed Jul 6 20:44:30 EDT 2011


Yep, it's loaded using the LoadPlugin function along with our reader 
plugin.  PV_PLUGIN_DEBUG=1 verified it. If I don't change any of the LIC 
attributes the script runs and I get a LIC successfully rendered.

What I just now noticed is that if the LIC plugin gets loaded before 
other plugins the problem goes away! So something about loading other 
plugins after the LIC makes LIC's attributes disapear. I sent a script 
that illustrates by loading the SLAC tools plugin. If you swap the loads 
the script will run.

On 07/06/2011 04:28 PM, Utkarsh Ayachit wrote:
> Burlen,
>
> Are you sure the plugin is loaded?
>
> Utkarsh
>
> On Wed, Jul 6, 2011 at 4:29 PM, Burlen Loring<bloring at lbl.gov>  wrote:
>> Hi,
>>
>> I am able to use a script written from python trace to render a LIC but when
>> I try to change any of the LIC parameters also from python trace I get
>> attribute errors (below). In the python shell launched from PV a dir shows
>> these attributes, however dir run from in the script shows they are missing.
>> How do I get the LIC attributes to be seen in a python script?
>>
>> Thanks
>> Burlen
>>
>> Traceback (most recent call last):
>>   File "test4.py", line 60, in<module>
>>     DataRepresentation2.LICNumberOfSteps = 12
>>   File
>> "/work/ext/ParaView/PV3-3.10.0/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py",
>> line 207, in __setattr__
>>     "to add this attribute.")
>> AttributeError: Attribute LICNumberOfSteps does not exist.  This class does
>> not allow addition of new attributes to avoid mistakes due to typos. Use
>> add_attribute() if you really want to add this attribute.
>>
>> _______________________________________________
>> 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
>>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo.py
Type: text/x-python
Size: 2683 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110706/4fbb8d8f/attachment-0001.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rankineXY_0.vti
Type: application/octet-stream
Size: 12813 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110706/4fbb8d8f/attachment-0001.obj>


More information about the ParaView mailing list