Import Image to view

I am trying to work throught the example from @Konrad_K_Sobon and the post I would like to place an image (digital image of professional registration seal) on each sheet.

However I am a bit lost as to the error message as I am pretty sure I have copied it steps exactly (sure u did, i know…)
“Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 34, in
AttributeError: ‘ImageType’ object has no attribute 'ToDSType”

Can u spot where I jacked this up?

<a class=“attachment”

href="//">ss.dyn (12.4 KB)

can you post the actual code? this forum is much better than old one and supports code so let’s not ask anyone willing to help you to retype that code.

1 Like

Sorry Konrad,
Thank you so much for taking the time to post at all. Below is everything

import clr
from Autodesk.DesignScript.Geometry import *

#Import documentManager and TransactionManager
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

#Import RevitAPI
import Autodesk
from Autodesk.Revit.DB import *

#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

filePath = IN[0]
runIt = IN[1]

if runIt:
	tempName = filePath.split("\\")
	elementName = tempName[len(tempName)-1]
	imgs = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_RasterImages).WhereElementIsElementType().ToElements()
	for i in imgs:
		if i.ToDSType(True).Name == elementName:
			imageOut = i
	message = "Success Bitches!"
	message = "Set RunIt to True."
#Assign your output to the OUT variable.
OUT = message


Is your matter fixed now?