c# - Transform absolute XREF l
I try to do a very simple thing : transform the absolute XREF links in relative in C#.I have no idea how can I translate the XREF path in relative.
I don't know where I can start.
I saw this article but does'nt help me ! Have you got information or details how can I do that?
Thanks a lot, Stephen's DevBlog article has everything you need, with exception of the assumed drawing, and XREF locations (you'll have to do that per your project folder structure, etc.).
Cheers Ok,
So, I will do my homework.
Thanks Hi,
I see more the code.
Stephen DevBlog uses the case where you know the current path of your XREF and the current path of your files. I don't want to rely to FindFile to find my XREF, on very big project, it's impossible.
The fonction must deduce (that's the main point) what is the relative path.
Do you understand my horrible English?
Best regards
In my idea, I would like to have a generic case.
I launch the command, the script must knows where I am and how can I make a relative path to all my XREF.
The main problem is to find a solution to {oldpathabsolute} {newpathrelative} without external intervention.
Consider using System.IO to 'find' the relative path, by removing the folders common to both the drawing you're evaluating via side-Database, and your BlockTableRecord's PathName, concatenating the resultant string as needed (i.e., "..\" + "SomePath").
Cheers
页:
[1]