doc.Path is empty when overriding ReadDocument method (Windows)



So I try to override the ReadDocument method which gets called when I open a .3dm-file, right?. So I have a file called “name.3dm” already saved on my machine and when I open it, the breakpoint I set in my override ReadDocument method works, but the doc.Path field is empty. Why is that?

Btw: The name is empty too, but all the other data is there, like the materials and objects and so on…

(Dale Fugier) #2

Hi @Ivan1,

Does this help?


Hi @dale,

Yes, this workaround does works if the following is true:
DocumentEventArgs e as parameter and then e.Document is the same as (equivalent to)
DocumentOpenEventArgs e and then e.Document in this only case of OnEndOpenDocument()

P.S. Is it weird that for Mac I don’t need this workaround and doc.Path is not empty?

(Dale Fugier) #4

Knowing the internal difference between the two versions, no. But thanks for point this out.

– Dale