I can get an image from the Image table to show up on the Configurator using and PicturBox, but this is a static image regardless of Operation, Attribute and measurement.
I am looking for a way to pull a picture in dynamically. So, for Operation 10 and Attribute HoleDiameter that might pull up an image displaying how to measure the Hole.
I tried the following code to test bringing in a part’s image from Part table, but don’t know how to make the final line of code work. Side note; i haven’t done coding in C, C+ in…forever, much less C#.
String Part = String.Empty;
String JobNumb = Context.JobNumber;
String company = Context.CompanyID;
company = “MyCompany”;
JobNumb = “1286”;
var PartNumb = (from r in Db.JobHead where r.Company == company
&& r.JobNum == JobNumb
select r).FirstOrDefault();
Part = PartNumb.PartNum;
var ImgID = (from s in Db.Part where s.Company == company
&& s.PartNum == Part
select s).FirstOrDefault();
Inputs.picPart0002.XXXXX = ImgID.ImageID;
XXXX = not sure of the type here
PicPart0002 is a picturebox from the Configurator.
I’m not sure what version of Configurator you’re on but this already exists. Check out Image Layers. Here’s a small snippet from the Configurator Technical Reference Guide.
We are on 10.2.400. I don’t see anything in our Configurator Designer in Toolbox that has Image Layers. I also searched the Tech Ref Guide for changing an image from a combo box, but couldn’t see any good examples of that either.
You are correct the Ref Guide has it, but I don’t see it on the Configurator Designer Tool box.
Either in General section or the Input Properties. Is there somewhere else I should be looking?
Sorry, I moved companies and don’t have access to the Configurator Designer any longer but I seem to remember @timshuwy showing this feature at Insights. He may have some insight.
Images do work… as @ckrusen suggested you use something like this
Inputs.MyPicture.Value = "PictureOfSomething";
But note that the picture must exist in the configurator database inside Epicor. So… if you import a bunch of different images, you can then change the image displayed to any of those images. it will automatically squeeze the image into the “box” that designated for Inputs.MyPicture… but you can also change the width and height of the image to stretch or squish anyway you desire. You can also move the image.