Revit 2021 API Docs- ImageImportOptions class depreciated?

Hi

I have an old graph I made that selects an image file, creates a drafting view and renames it to match the original file name.

We recently upgraded to Revit 2021 and dynamo 2.5. This graph has stopped working.

I get this error
image

I made a new python script window and used the command suggestion thing. ImageImportOptions() is not showing up.
image

https://www.revitapidocs.com/ does not have code for 2021.
Load images to project?

This graph was created from @Konrad_K_Sobon post

Can someone help me here, please
Has 2021 API been released, if so where do I find it?.
has this been depreciated - if so is there a new method?.

Image File to Drafting View.dyn (40.3 KB)

This code was replaced in 2021, to account for some of the user interface changes which were also added. A listing of the changes can be found here:

Thanks @jacob.small.
Is there any documentation on how to use the new methods?.
I’m not sure how I fix my code from that info.

Not sure, but I haven’t really dug into it. Knowing the methods means you could try learning by experimentation to some extent (that is feed it two overrides which won’t work - say DateTime objects - return the trace back to see what the method requires, and then then give the node that thing).

Have you checked to see if there is a node in archilab package for this? Silly to reinvent the wheel for everything if you can consume something common.

Thank you @jacob.small
Sure enough, archilab included the nodes required to update my graph.

2 Likes