Home Image-Pro Automation (Macros, Apps, Reports)

Image Sets

Hello

I'm writing an automation which deals with 3D image sets. I'm trying to set each channel to Timepoint 1 and z position 1 so that everything is synchronised. I recorded the code below to set everything to position 1 (0 really) but I get the error Object Reference not set to an instance of an object. I guess its not added a reference from the References list but which one is it.

Public Function NewMacro() As SimpleScript
        NewMacro = New SimpleScript
        Dim window1
        Dim var1 = "sync_monopolin_14April2014_01_07_R3D", doc1

        With Application.WindowCommands.Active(NewMacro)
            .Run(window1)
        End With

        With New MediaCy.Viewers.Set.ImageSetViewOptionsCommand(NewMacro)
            .ActiveDimension = MediaCy.IQL.Sets.mcImageSetDimensions.mcisdChannel
            .Run(window1)
        End With

        With Application.DocumentCommands.Activate(NewMacro)
            .Run(var1, doc1)
        End With

        With New MediaCy.Viewers.Set.ImageSetViewOptionsCommand(NewMacro)
            .ViewLocation = New McImageSetLocations
            .ViewLocation.Add(mcImageSetDimensions.mcisdChannel, 0)
            .ViewLocation.Add(mcImageSetDimensions.mcisdZ, 0)
            .ViewLocation.Add(mcImageSetDimensions.mcisdTime, 0)
            .ActiveDimension = MediaCy.IQL.Sets.mcImageSetDimensions.mcisdChannel
            .Run(window1)
        End With

    End Function

Regards

David  

Best Answer

  • Answer ✓
    Probably you have Beta which cannot be upgraded via TrueUpdate. You need to uninstall your version and install released version. Please, contact to Media.

Answers

  • edited May 2014

    Hi David,

    Verify references MediaCy.IQL.Sets.dll and MediaCy.Viewers.Set.dll and add Imports MediaCy.IQL.Sets if missing.

    Nikita.

     

     

  • Hello Nikita

    They are all there but still doesn't work

    Regards

    David

  • David,

    I would remove the following command, it doesn't seem to be part of your workflow and the image that it refers to may not exist.

            With Application.DocumentCommands.Activate(NewMacro)
                .Run(var1, doc1)
            End With
    
    Pierre
  • I guess you are talking about Premier msg. Please, Copy and Paste this msg.
  • Hello Pierre

    Premier often puts that line in when I record something, sometimes it can be taken out sometimes it can't what is it doing. In this case when I take it out the automation doesn't throw an error about it so its removed.

    Regards

    David

  • Hello Nikita

    This is the error box

  • Hello

    It appears to be a version problem. When I use the code on a 2D version of Premier it works fine. However in my 3D Premier which is a lower version number it doesn't work. I tried looking for updates in the 3D Premier but it tells me I have the latest version even though its build 5395 compared to Build 5425 on my 2D system. Is there another way of updating 3D.

    Regards

    David

  • Hi David,

    You need to upgrade IP Premier 3D (the relase build is 5429).

    Nikita.

  • Hello Nikita

    I know, but it won't let me, it insists I'm up to date. Is there a download location for it

    Regards

    David

  • Ok Thanks


    Regards


    David

Sign In or Register to comment.