Grasshopper

algorithmic modeling for Rhino

I want read comments from script useing XDocument.

LINQ-to-XML introduces XDocument, designed to overcome the enormous list of shortcomings and complexities relating to XmlDocument. It is now the preferred object model for reading, querying and otherwise operating upon XML documents (or even fragments, the implementation doesn’t care).

Assuming the XML documentation file is in the same location as the executable, it’s ludicrously simple to get the XML comments for a reflected member:

When use code:

AssemblyName assemblyName = this.GetType().Assembly.GetName();

XDocument xml = XDocument.Load(assemblyName.Name + ".xml");

Get error:

error: File 'C:\Program Files (x86)\Rhinoceros 5\System\1996b995-eb5b-4da0-96e5-c11336b4126a.xml' not found. (line: 0)

May be this is a problem with script environment.

If this behavior by design, than how I can get this information?

Views: 1121

Replies to This Discussion

No, because this library work with .xml file, which generate at compiling stage(option /doc for Visual Studio). C# component compile source without this option, as result have compiled dll and pdb file.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service