Page 1 of 1
List XReference
Posted: 07 Jul 2009, 16:35
by ywxu
How can I get a full list of the XReferences even some of them can't be loaded ?
Re: List XReference
Posted: 13 Jul 2009, 16:48
by support
Hello.
You can get the full list of XReferences using CADImage.Converter.XRefs property
Alexander.
Re: List XReference
Posted: 23 Jul 2009, 07:52
by ywxu
Thanks for your reply. I'm using following code to count the number of XREF:
Code: Select all
Dim sFullName As String = "D:\Desktop\drawing1.dwg"
Dim dwg As CADImage = CADImage.CreateImageByExtension(sFullName)
dwg.LoadFromFile(sFullName)
Dim n As Integer = dwg.Converter.XRefs.Count
The file "drawing1.dwg" actually has a xref "drawing2.dwg". If I place the xref "drawing2.dwg" in the path where can be located by "drawing1.dwg", then the above code shows me "1" - there is one xref. But if I place the xref in somewhere can't be located, then the above code shows me "0". The result I want the program to show me is there is one xref but it is missing. How can I get this result?
Re: List XReference
Posted: 27 Jul 2009, 17:27
by support
XRef object is a block that is loaded from a file by reference. In your example "drawing1.dwg" doesn't contain "drawing2.dwg" but only reference to it. When loading, if this reference not valid, XRef can't be loaded and ignored.
Alexander.