-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example on how to use DxfImage #157
Comments
Ok I actually found out reading the tests that to make it work you need to add
|
Although the attributes are now in the DXF, i can't manage to make autocad open the DXF with the image as an external reference. The dependency doesn't seem to be considered even though it is included in the DXF file. Any idea on how to achieve this ? Here's my generation code: //Setup the file
var file = new DxfFile();
file.Header.Version = DxfAcadVersion.R14; // DxfImage is only supported on >= R14
//Adding a line to test
DxfLine aLine = new DxfLine();
aLine.P1 = new DxfPoint(0, 0, 0);
aLine.P2 = new DxfPoint(0, 1, 0);
file.Entities.Add(aLine);
//Setting up the image
var image = new DxfImage("TestImage.png", DxfPoint.Origin, 1920, 1080, new DxfVector(19.2, 10.8, 0.0));
image.IsVisible = true;
image.ShowImage = true;
file.Entities.Add(image);
//Write the file
using (FileStream filestream = new FileStream(outputPath, FileMode.Create))
file.Save(filestream); |
|
I tried with AutoCAD 2020 and it ignores the reference as well. Although I tried with AutoCAD 2020 and netDxf / ezDxf and it works well. |
Hi,
I am trying to use the DxfImage entity to insert an image dependency into my DXF but I cannot make it work. The DXF output seems not to contain the image attributes that I put. Does anyone have a working example?
Thanks !
The text was updated successfully, but these errors were encountered: