How can I display more than image through Watch. Image?
I tried to use Excel file with many inserted images, but there was a warning
@Walaa.Mahmoud the Watch Image
node only supports showing a single image at a time. In your particular case, you have a file path of an excel document, which as the warning message states, is not supported.
1 Like
Maybe making a slideshow with periodic mode
import sys
import clr
import System
from System.IO import *
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('System.Drawing')
import System.Drawing
from System.Drawing import *
#reference dynamo core to update node values
clr.AddReference('DynamoRevitDS')
clr.AddReference('DynamoCore')
import Dynamo
from Dynamo.Graph import UpdateValueParams
#access to the current Dynamo instance and workspace
dynamoRevit = Dynamo.Applications.DynamoRevit()
engine = dynamoRevit.RevitDynamoModel.EngineController
currentWorkspace = dynamoRevit.RevitDynamoModel.CurrentWorkspace
model = dynamoRevit.RevitDynamoModel
searchFolder = IN[0]
lst_img_files = Directory.GetFiles(searchFolder, "*.jpg", SearchOption.TopDirectoryOnly)
node_indexer = next((i for i in currentWorkspace.Nodes if i.Name == 'index'), None)
if node_indexer is not None:
value_index = node_indexer.GetValue(0,engine).Data + 1
if value_index + 1 > len(lst_img_files) :
value_index = 0
params = UpdateValueParams("Code", value_index.ToString())
out_img = Image.FromFile(lst_img_files[value_index])
#perform update
node_indexer.UpdateValue(params), value_index
OUT = out_img
8 Likes
Awesome use!
Also, AWESOME VACATION PICS!
3 Likes
Great ! Thank you