Import images into Revit Image Manager

I am using the Orchid Document.ImportImage node to import images into Revit image manager.
I am working on a script that takes conduit parameters and puts them into a QR code and puts the QR code image into an image parameter for each conduit element. It works fine on the first run, but If I need to run it again, it creates a duplicate in the image manager. The .PNG is not duplicated, just the name in image manager.
Is there any way to get it to overwrite the name?

image

I think this would be best handled by element binding, but as far as I know the Orchid node doesn’t maintain ownership of the created elements in Dynamo - moving them to Revit owned elements instead. @erfajo is this correct?

Sure a Boolean input for overwrite if existing would be perfect!
Would this overwrite the name in Image Manager?
As you can see In my image above, I named the image with the element id. Revit used the same .png file (or overwrote the file?) and gave it a new name.

This is for another thread,… but my end goal with this is to make a schedule for prefab assemblies. The schedule would be printed on the sheet with the assembly. The prefab shop would scan the the QR code to print a label to tag the item. I could take it even further to have a database that shows what is complete.

I ran it 3 times and it worked flawlessly!! No double names or files.
Thank you for your your help!

1 Like