|
[Sponsors] |
October 13, 2015, 01:26 |
set slice name with python
|
#1 |
Member
sean read
Join Date: Sep 2014
Location: Melbourne, Australia
Posts: 41
Rep Power: 12 |
So I'm trying to iterate over slices and feature edges, I can do it using
Code:
Sli = Slice( SliceType="Plane" ) Sli.SliceOffsetValues = [0.0] Sli.SliceType.Origin = [0, 0, 0] Sli.SliceType.Normal = [1, 0, 0] Sli.SliceType = "Plane" Sli = FindSource("Slice1") SetActiveSource(Sli) Integra = IntegrateVariables() intData = servermanager.Fetch(Integra) Area = ns.vtk_to_numpy(intData.GetCellData().GetArray('Area'))[0] SetActiveSource(Sli) FEdge = FeatureEdges() Int = IntegrateVariables() InDat = servermanager.Fetch(Int) Len = ns.vtk_to_numpy(InDat.GetCellData().GetArray('Length'))[0] Code:
Sli = FindSource("Slice1") Code:
>>>print Sli.returnname() Slice1 Code:
>>> Sli.changename(newname) is there such a method that I'm missing somewhere? |
|
October 13, 2015, 05:31 |
|
#2 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi Sean,
To rename a source: Code:
RenameSource('TheSlice', Sli) Mikko |
|
October 13, 2015, 08:09 |
|
#3 |
Member
sean read
Join Date: Sep 2014
Location: Melbourne, Australia
Posts: 41
Rep Power: 12 |
Thanks again Mikko!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenVSP: Python API call to set RPM of a disk | Brunomrm | Main CFD Forum | 0 | July 30, 2018 14:20 |
[General] Python Scripting - Set Legend Label Color | MTMILLS87 | ParaView | 0 | February 22, 2018 14:20 |
Ansys Licence Serve on Ubuntu 16.04 LTS | david.pasquale | ANSYS | 2 | January 20, 2017 12:52 |
[OpenFOAM.org] set up python path for python in paraview compiled with openfoam | seanread | OpenFOAM Installation | 7 | October 31, 2015 21:20 |
[General] 2 datas on one plot | Akuji | ParaView | 46 | December 1, 2013 15:06 |