View Only
  • 1.  Deploy Xpression Project with Script

    Posted 12 days ago


    I'm looking to have a script in Xpression deploy a project from our project server down to our Graphites. Usually we only need to deploy the most recently published revision of each show.

    Here's what I have so far, but it's not deploying anything. I know something is wonky with the script, but I don't know enough about VB to troubleshoot it.

    dim ProjectServerClient as xpProjectServerClient
    dim Revision as xpProjectServerRevision
    dim Revisions as xpProjectServerRevisions
    dim Show as xpProjectServerShow
    dim Shows as xpProjectServerShows
    dim MaxResult as Integer = Revisions.Max()
    Shows.GetShow("show name",Show)
    ProjectServerClient.DeployRevision(Revision,"D:\Project Server Deploy")

    [Nick] [Kubinski]
    [Studio Production Specialist]
    [Sysmex America Inc.]
    [Vernon Hills] [USA]

  • 2.  RE: Deploy Xpression Project with Script
    Best Answer

    Ross Staff
    Posted 12 days ago

    dim projServerClient as xpProjectServerClient
    dim projServerRevisions as xpProjectServerRevisions
    dim projServerRevision as xpProjectServerRevision
    dim projServerShows as xpProjectServerShows
    dim projServerShow as xpProjectServerShow
    dim projServerCat as xpProjectServerCategory
    dim projServerStyle as xpProjectServerStyle

    dim host, login, pwd, projName as string
    dim port as long

    'Login Info
    host = ""
    port = 8181
    login = "admin"
    pwd = "admin"

    projName = "mcg"

    engine.debugMessage("Going to project server for project: " & projName, 0)

    projServerClient.Connect(host, login, pwd, port)
    projServerClient.GetShowsByKeyword(projName, projServerShows)
    projServerShows.GetShow(0, projServerShow)
    projServerClient.GetShowRevisions(projServerShow, projServerRevisions)
    projServerRevisions.GetRevision(0, projServerRevision)
    projServerClient.DeployRevision(projServerRevision, "D:\Projects\AFL\")
    engine.loadProject("D:\Projects\Project\" & projServerRevision.FileName)

    engine.debugMessage("Project Loaded", 0)
    engine.debugMessage("File path: " & "D:\Projects\Project\" & projServerRevision.FileName, 0)
    engine.debugMessage("Revision: " & projServerRevision.Revision, 0)
    engine.debugMessage("Creation Date: " & projServerRevision.CreationDate, 0)
    engine.debugMessage("Total Files: " & projServerRevision.TotalFiles, 0)
    engine.debugMessage("Total Size (KB): " & projServerRevision.TotalSizeInKB, 0)
    engine.debugMessage("Total Size (MB): " & projServerRevision.TotalSizeInMB, 0)

  • 3.  RE: Deploy Xpression Project with Script

    Ross Staff
    Posted 12 days ago

    That script adds a bunch of Debug message stuff that you could remove. The things in bold are what you will want to change. 

    This script deploys the project from the project server AND then loads the project from disk. Those are separate steps. (DeployRevision & LoadProject)

    GetShow - this is the name of the show on the Project Server, not the name of the Project that is in the Show. 

  • 4.  RE: Deploy Xpression Project with Script

    Posted 11 days ago

    Hey Garner,

    This worked perfectly! Thank you very much.

    A follow up question, if a Show has multiple Projects saved to it (Project1, Project2, Project3) each with their own list of revisions, is there an easy way to call out that specific project file name, or would it be easier to separate those projects into their own Shows?

    [Nick] [Kubinski]
    [Studio Production Specialist]
    [Sysmex America Inc.]
    [Vernon Hills] [USA]

  • 5.  RE: Deploy Xpression Project with Script

    Ross Staff
    Posted 9 days ago

    Good to hear, its not an easy script to figure out.

    You will need to separate the projects out into different shows. Having multiple projects in a single show is not a supported workflow. 

  • 6.  RE: Deploy Xpression Project with Script

    Posted 9 days ago

    I'll separate the projects into their own Shows then. Thanks again Garner!

    [Nick] [Kubinski]
    [Studio Production Specialist]
    [Sysmex America Inc.]
    [Vernon Hills] [USA]