Hello everyone,
I’m trying to import an image in View with the node “GIS2BIM.ImportImageInView”.

ImageWidthMeters: 100
View: 3D
ImagePath: A link where the photo is automatically saved (through the node “GIS2BIM.SystemDrawingBitmapToJPG”).
DeltaX: 0
DeltaY: 0

But it doesn’t work.
Could any of the input be incorrect?
I am thankful for your help
ImportImageInView(Test).dyn (92.5 KB)

This could be revit version issue. This part of the api has changed a few times the last couple of years.
Please check for the latest package version.
Hopefully that is enough.

Hello @omar.omar …you could try with archilab instead…

Thanks for the hint. I think I have the latest version.

Thank you for the answer. But the View dont aktzeot the Image.

Hello @omar.omar …are you sure you have yhe right version archilab ??

and when i choose Site Plan i get this Message

hi it seems your try to place the image outside revits limit…try to insert closer to your origin or relocate your projects…

Thank you, is that the right Version what i use? 2022.212.2722?

if you had Revit 2022.212.2722 you should go with the first version in the list

Thank you. its works now
But i have a qutuion. man cann’t import image in 3D View?..

1 Like

Nope it isnt possible even manuelly in revit…

Thank you very much.
I have the coordination as a jgw file. How can I make sure that this photo is placed in the right place and has the right scale?


Try with sample custom update for revit 2021,2022

Python Scripts :

#Copyright(c) 2021, Hồ Văn Chương
# @chuongmep,
import clr
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

from System.Collections.Generic import List

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

import System 
from System.Collections.Generic import *

doc = DocumentManager.Instance.CurrentDBDocument

path = IN[0]
#Do some action in a Transaction
op = ImageTypeOptions(path,False,ImageTypeSource.Import)
imageType = ImageType.Create(doc,op)
ops = ImagePlacementOptions(XYZ.Zero, BoxPlacement.Center)
img = ImageInstance.Create(doc,doc.ActiveView,imageType.Id , ops)
#Do Action

OUT = img

If you want try with Csharp Code:

Transaction tran = new Transaction(DB.Doc, "tran");
            string path = @"C:\Users\Chuong.Ho\OneDrive\Hình ảnh\python-3521655-2945099.png";
            ImageTypeOptions op = new ImageTypeOptions(path,false,ImageTypeSource.Import);
            ImageType imageType = ImageType.Create(DB.Doc, op);
            if (ImageInstance.IsValidView(DB.Doc.ActiveView))
                ImagePlacementOptions ops = new ImagePlacementOptions(XYZ.Zero, BoxPlacement.Center);
                ImageInstance imageInstance = ImageInstance.Create(DB.Doc, DB.Doc.ActiveView,imageType.Id , ops);

Some document update you can check
File Demo
ImportImageInView(Test).dyn (71.4 KB)

thank you