Hi,
Did you even get CAD Import .NET to handle Xrefs?
Regards,
Fred Chateau
CAD Import .NET XRefs
Moderators: SDS, support, admin
Yes, CADImport.NET can handle Xrefs
please post questions to the forum or write to support@cadsofttools.com
please post questions to the forum or write to support@cadsofttools.com
Hello!
Please try the following code:
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
Please try the following code:
Code: Select all
<font color="blue">private void</font id="blue"> btnGetXRefs_Click(<font color="blue">object</font id="blue"> sender, System.EventArgs e)
{
<font color="blue">if</font id="blue">(<font color="blue">this</font id="blue">.FCADImage == <font color="blue">null</font id="blue">) <font color="blue">return</font id="blue">;
<font color="blue">if</font id="blue">(<font color="blue">this</font id="blue">.FCADImage.Converter.XRefs == <font color="blue">null</font id="blue">) <font color="blue">return</font id="blue">;
<font color="blue">int</font id="blue"> cn = <font color="blue">this</font id="blue">.FCADImage.Converter.XRefs.Count;
MessageBox.Show(<font color="blue">string</font id="blue">.Format("Count XRefs - {0}", cn));
CADXRef rf;
<font color="blue">for</font id="blue">(<font color="blue">int</font id="blue"> i = 0; i < cn; i++)
{
rf = (CADXRef)<font color="blue">this</font id="blue">.FCADImage.Converter.XRefs[i];
MessageBox.Show(<font color="blue">string</font id="blue">.Format("XRefs[{0}] path - {1}", i, rf.Path));
}
}
Please post questions to the forum or write to support@cadsofttools.com
Re: CAD Import .NET XRefs
Hello,
If it can be useful to someone: The code in c#
If it can be useful to someone: The code in c#
Code: Select all
using CADImport;
...
string path = "c:\\Users\\User\\exampleWithXrefs.dwg";
CADImport.DWG.DWGImage vCADFile = new CADImport.DWG.DWGImage();
vCADFile.LoadFromFile(p.rutaLocal);
CADEntityCollection xrefs = vCADFile.Converter.XRefs;
foreach (CADXRef rf in xrefs)
{
System.Diagnostics.Debug.WriteLine(" ***" + rf.Path);
}