Insert .bitmap into Image Parameter

Hello
Fairly new to dynamo here!
I have export as .PNG several legend views, i would like now to import said .PNG into Detail items Image Parameter, is this possible? the Set Parameter Value is not working…


What is the best way to aproach this?

1 Like

@TiagoGoncalves_QD_ES ,

seems to be a type parameter, but not editable

did you try Set type Parameter?
grafik

i have now, but it still does not fill the Image parameter

With set parameter for image, you need do some thing like that to can set :

  • Example for Revit API
 using (Transaction transaction = new Transaction(Doc,"set"))
        {
            transaction.Start();
            string imgPath = @"C:\Users\chuon\photo_2022-10-23_11-55-38.jpg";
#if R23
            ImageTypeOptions imageTypeOptions = new ImageTypeOptions(imgPath,false,ImageTypeSource.Import);
            ImageType imageType = ImageType.Create(Doc, imageTypeOptions);
#else
        ImageType imageType = ImageType.Create(Doc, imgPath);
#endif
        
            int id = 990191;
            Element element = Doc.GetElement(new ElementId(id));
            FamilySymbol? familySymbol = element as Autodesk.Revit.DB.FamilySymbol;
            var parameter = familySymbol.LookupParameter("test");
            parameter.Set(imageType.Id);
            transaction.Commit();
        }

With Dynamo Python Script is same, you need to input a imagetype id to can set, don’t forget open a transaction to set parameter.

 parameter.Set(imageType.Id);
1 Like