Creating drafting views and importing images

Hi,

New user. I have an extensive request. I see from this post it is possible to create a drafting view for every image in a file directory and name each view according to the file name and place the image in said drafting view. The links on the post are no longer active but wanted to know how I can accomplish this as well. No worries if its just going to require some grunt work.

Thanks!

I was able to dig up the original post but the images are unreadable. There may be some good info to still give you direction, but you’ll have to go off the image in the post you linked for a code base. It seems to all be there (minus a few references at the start of the code, but that shouldn’t be much of an issue), you’ll just have to work through matching the python code with the inputs that it needs. Try starting on that and see where you get.

Hello @cgambleTFFSQ is it something here you mean ?

Revit_bPX6uLBdCK

Hi, yes that looks like what im trying to accomplish.

Hi, again, circling back. What package is required to get the SOVI_Load_Image node?

Hi @cgambleTFFSQ you can try as here for load an image into document

import clr
import os

clr.AddReference("RevitAPI")
clr.AddReference("RevitServices")
from Autodesk.Revit.DB import ImageType, ImageTypeOptions, ImageTypeSource
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
inputs = IN[0]

inputs = inputs if isinstance(inputs, list) else [inputs]

TransactionManager.Instance.EnsureInTransaction(doc)
results = [
    ImageType.Create(doc, ImageTypeOptions(path, False, ImageTypeSource.Import))
    
    if os.path.exists(path) else None  
    for path in inputs
]
TransactionManager.Instance.TransactionTaskDone()

OUT = results[0] if len(results) == 1 else results