Search found 3 matches
- 29 Sep 2023, 16:53
- Forum: CAD .NET
- Topic: Get all external files from DWG
- Replies: 2
- Views: 1461
Re: Get all external files from DWG
Hello,
I found the solution. With this code:
The project has images outside the dwg and can't work without them. With this code we can extract these files.
I found the solution. With this code:
Code: Select all
foreach (CADImageDef imdef in vCADFile.Converter.ImageDefs)
{
Debug.WriteLine(" *** IMAGE NAME: " + imdef.FileName);
}
- 28 Sep 2023, 17:42
- Forum: CAD .NET
- Topic: Get all external files from DWG
- Replies: 2
- Views: 1461
Get all external files from DWG
In c#, using "CADImport .NET" we can get all xrefs from a dwg file. CADEntityCollection xrefs = vCADFile.Converter.XRefs; foreach (CADXRef rf in xrefs) { System.Diagnostics.Debug.WriteLine(" ***" + rf.Path); } But, how I get all other external files included in a DWG? All images, pdfs, etc? Thanks i...
- 28 Sep 2023, 17:32
- Forum: CAD .NET
- Topic: CAD Import .NET XRefs
- Replies: 5
- Views: 18108
Re: CAD Import .NET XRefs
Hello, If it can be useful to someone: The code in c# 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...