Hello,

I’m having trouble with a function to loop through the fracture list and modify the dip/ddir based on a surface orientation. The function below works fine when working with zones, but I can’t figure out what is going wrong when applying to fractures.

I think it’s not working because the frac.list command points to the DFN, rather than the fractures within the DFN? I imagine I need to change to the dfn.fracturelist command but I can’t seem to get the syntax correct.

Any help will be greatly appreciated!

```
fish define ori_dfn
loop foreach local frac frac.list
local dxf = geom.set.find('surface')
local fracpos = frac.pos(frac)
local polyid = geom.poly.near(dxf,fracpos)
local dip = math.dip.from.normal(geom.poly.normal(polyid))
local ddir = math.ddir.from.normal(geom.poly.normal(polyid))
local dipdeg = dip/math.degrad
local ddirdeg = ddir/math.degrad*-1
frac.prop(frac,'dip') = 180-dipdeg
frac.prop(frac,'dip-direction') = (180-ddirdeg)%360
endloop
end
[ori_dfn]
```