Change Perspective Wallpaper

Hello, i use GhPython to change Perspective Wallpaper but always have an error
I use the same code from help

I try this but also error

Try this

import rhinoscriptsyntax as rs
view = rs.CurrentView()
filename = rs.OpenFileName()
if filename and view :
    rs.Wallpaper(view, filename)
1 Like

Thank you very much NARUTO, it work fine
i am sure i tried that before, i don’t know why it didn’t work

import rhinoscriptsyntax as rs

        if Wallpaper == True:
            rs.Wallpaper(View, Filename)
            rs.WallpaperHidden(View, Show)
            Hidden = rs.WallpaperHidden(View, Show)
            if Hidden == False:
                 rs.Wallpaper(View, "")