c# - Why do custom file properties, set using the DSOFile library, not persist after saving? -


I am currently working on a plug-in for AutoCAD which will allow users to interact with a documented version of the application. Allows, and I had planned to use custom file properties to sync files between remote repositories and local machines. When a file is initially downloaded, the properties are set, and continue until the file is maintained on the user's local drive. I'm not really interested in an AutoCAD-specific solution because my plugin will work with autocad drawings (text files, image files, other than others) with files other than Therefore, I want a library that can handle as many possible file types as possible.

When I search for implementing this type of thing in C #, I almost came to the DSOfile Library almost immediately. Whatever I read, everything was designed for MS Office, but it should work with any file, unless that file system NTFS (at least this is my understanding). I had no problem setting custom properties on files like plain-text documents (.txt), AutoCAD images (.dwg), and images (.jpg, .tif, etc.) However, I saw that any of these files were saved, custom properties were erased. The only case on MS Office documents that I saw on custom properties was continued after saving. I thought this problem was related to those applications which I was using to save files (AutoCAD, MS Paint, Notepad etc), but I can not be 100% sure about that. Before I decide to go with a solution other than using DSOfile, I have to see that anyone has some insights on this issue.

I delete custom properties after saving any type other than MS Office (Word and Excel) documents, using any code of my code and using the DSO file, and the same result both times. Were given.

Here's a new example, which I will use to add a new custom property ...

var docProperties = new ऑलडॉकमेंट प्रॉपर्टीज (); DocProperties.Open ("myfile.txt", false, dsoFileOpenOptions.dsoOptionDefault); Try {object value = "some value"; DocProperties.CustomProperties.Add ("MyCustomProp", referee value); } Finally {docProperties.Close (true); // save and close}

It may be too late but I used it Is Bit or Autodesk Revit RFA files as well as PDF files and it works fine so you can not edit them while the RFA is open.

Did you call the Docproperties. (At all)?


Comments