dimven / SpringNodes

A collection of Dynamo nodes
MIT License
69 stars 46 forks source link

parse Interferencecheck node #54

Closed Mohamadnawar closed 5 years ago

Mohamadnawar commented 5 years ago

Hello,

The below node not working in Revit 2020

image

mehmetduzenli commented 5 years ago

i have the same problem

dimven commented 5 years ago

Revit 2020 uses a new version of iron python - 2.7.8. The way this new version opens and reads text files seems to be different. Still trying to figure out why.

dimven commented 5 years ago

As a temporary fix, edit the python script and replace lines 48 to 50 as such:

image


with System.IO.File.OpenText(report1) as f:
    while not f.EndOfStream:
        parser.feed(f.ReadLine().replace("&", ""))
dimven commented 5 years ago

the python equivalent of the above code seems to be:

import io
with io.open(filepath, "r", encoding="utf-16") as f:
    for line in f:
        print line
Mohamadnawar commented 5 years ago

Thank you working perfectly now