Mark/MP or anyone else,
I've taken a look at MP's function and I'm trying to disect it to find exactly what I need, but all I've gotten so far is a headache.
What I'm trying to do is create a lisp that will open a selected xref file. In order to do that i have to get its path. File size, Flags, or Count is not needed.
I do use refedit, but in some cases an actual opening of the file is neccessary.
Disect it?
Maybe you can better define what mean "The path of a selected xref". How are you selecting it?
But to push forward with an attempt to help (as questionable as that may be before my first coffee) ...
If you load up my utility you might call / invoke it like this:
(GetXrefsProperties
(vla-get-activedocument
(vlax-get-acad-object)
)
)
It might return the following data --
( ( "Taisei Detail Plan"
"C:\\ACAD2006\\SAMPLE\\TAISEI DETAIL PLAN.DWG"
44
1
)
( "Taisei Door Window Sheet"
"C:\\ACAD2006\\SAMPLE\\TAISEI DOOR WINDOW SHEET.DWG"
44
1
)
( "Taisei Interior Elv"
"C:\\ACAD2006\\SAMPLE\\TAISEI INTERIOR ELV.DWG"
44
1
)
)
There are 3 items in the list. Each Item is also a list itself. The first item is the xref name, the second the path, the third the flags* values, and finally the forth is the tally of the number of instances of said xref (normally 1).
So, let's say I "picked" the xref "Taisei Detail Plan" and I wanted the path for it:
(cadr
(assoc
"Taisei Detail Plan"
(GetXrefsProperties
(vla-get-activedocument
(vlax-get-acad-object)
)
)
)
)
=> "C:\\ACAD2006\\SAMPLE\\TAISEI DETAIL PLAN.DWG"
Hope this helps.
*Flags is the bitcoded value associated w/dxf group 70, please see the dxf reference.