cart: empty [ Login ]

Unable to insert background image from Azure path

1 
Sachin Tripathi
11/27/2019 9:45 AM
Hi Wout, I'm trying to draw a background image in DWG file but images are not showing as an entity in a generated DWG file. See the code snippet below:
C# Code:
DxfImage backImage = new DxfImage(); backImage.Layer = BackgroundImageLayer; backImage.ImageDef = new DxfImageDef(layoutModel) { Filename = @"fileurl" }; backImage.ImageDef.DefaultPixelSize = new Size2D(1d, 1d); backImage.ImageDef.ImageIsLoaded = true; backImage.Fade = 50; backImage.InsertionPoint = new Point3D(0d, 0d, 0d); backImage.ImageDisplayFlags = ImageDisplayFlags.ShowImage; backImage.SetDefaultBoundaryVertices(); layoutModel.Images.Add(backImage.ImageDef); layoutModel.Entities.Add(backImage);
Thanks, Sachin
Wout
11/27/2019 9:50 AM
Hi, AutoCAD doesn't support urls in the image definition. - Wout
Sachin Tripathi
11/27/2019 10:44 AM
Hi, So what is the workaround in that case? Do we need to download that file from Azure first then we can set the path? Or can we set the UNC path instead? Kindly suggest. Thanks!
Sachin Tripathi
12/9/2019 10:43 AM
Hi Wout, Just a quick confirmation. Your thought on this will really help me a lot. Whenever we are generating any DWG file with the background image(local path), do we need that image file as well? Because whenever we are sending that dwg file only with the client they can't have that background image within. Thanks! -Sachin
Wout
12/9/2019 12:42 PM
AutoCAD only supports local paths, I thought you already understood the answer I gave you. - Wout
1