Hi
How could i add Image to Image Instance Parameter into Identity Data?
i tried BuiltInParameter class, but didn't work!
Solved! Go to Solution.
Solved by aignatovich. Go to Solution.
Hi!
Find ImageType element (or create a new one), provide its id to parameter.Set method
thanks, but as i know its not possible to create project parameter https://forums.autodesk.com/t5/revit-api-forum/create-project-parameter-not-shared-parameter/td-p/51...
if i use this code for getting parameter
Parameter param = ele.get_Parameter(BuiltInParameter.ALL_MODEL_TYPE_IMAGE);
is it ok to define the url of image by string?
param.Set(@"C:\Users\Desktop\12.jpg")
You are right, you should get your parameter by BuiltInParameter.ALL_MODEL_TYPE_IMAGE, that is correct (from your code).
But the next part won't work. You should do something like:
var imageType = ImageType.Create(doc, pathToImage); parameter.Set(imageType.Id);
Hello,
I created and instance parameter of type image. I was able to insert an image into the parameter for every instance with the below code.
var imageType = ImageType.Create(activeDoc, lo.barcode_image);
rw_barcode_image.Set(imageType.Id);
now I need to iterate through the element instances and get the image path from each parameter. I just need the code to fetch the image path from the parameter. could someone please help me?