XREF relative path odd behavior

XREF relative path odd behavior

Anonymous
Not applicable
895 Views
4 Replies
Message 1 of 5

XREF relative path odd behavior

Anonymous
Not applicable

So, I was messing around with XREF's relative paths and found a weird behavior, I'd like to know if it's acting as expected, or if its indeed a bug;

 

I have a directory with a depth of 3 folders, as the image attached shows

Capture.PNG

I have a .dwt file in the "2- Vertical alignment" folder that has an XREF in it, the XREF path is inside the 1- Templates folder, and I used the following relative path: "..\..\1- Templates\XREF.dwg", this behaves as expected since it "jumps up" two folders (In this case, up to the "Example" folder), then looks for the folder named "1- Templates" and proceeds to XREF the file in it named XREF.dwg.

 

The odd behavior starts when I moved the .dwt file to the same folder where the XREF.dwg file is (Which is, the "1- Templates" folder), I was expecting the XREF to break, but it didn't, though it doesn't make sense that it didn't since the relative path is still "..\..\1- Templates\XREF.dwg", which in this new case, it should "jump up" 2 directories, then try to find the "1- Templates" folder, which there isn't any, yet it finds the correct file (It even shows the correct location in the found file path).

 

Even if it's actually working, it worries me that I think that it shouldn't, this makes me think that sometimes thing will go the other way, and won't work when they actually should.

 

Thanks in advance!

0 Likes
Accepted solutions (1)
896 Views
4 Replies
Replies (4)
Message 2 of 5

Ed__Jobe
Mentor
Mentor
Accepted solution

Its behaving properly. If the file can't be found using the Path property, it then looks in the search file paths, and if not found in any of those places, it looks in the same folder where the file resides.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 5

cadffm
Consultant
Consultant
Xrefs and block are searched by given path as first, if not there:
In current folder of masterfile (it is one of the most feature in acads xref world)
and all others supportpathes of your current profile.
And if your masterfile have information to PROJECTNAME acad search for the project in your profile and search in there projectfolders.

And as last: I think in active folder (can not explain this in detail) too.

Normal thing since decades

Sebastian

0 Likes
Message 4 of 5

cadffm
Consultant
Consultant
After you moved the file and open the master, look into xref manager and see
Saved path vs. Found in (or something like this)

Sebastian

0 Likes
Message 5 of 5

Anonymous
Not applicable

Thank you very much! I was suspecting it was doing that; not finding the file then proceeding to searching it on the directory of the master file, I even found a list of the order of searches it does, however the Autodesk Help article only mentioned this list when the no path option was selected for XREFS.

0 Likes