2 Replies Latest reply on May 25, 2012 1:15 PM by chrisaustin

    Invoke-SwisVerb to create new MapStudio File

    chrisaustin

      I am trying to create a new mapstudio file by using the InsertFile verb.  From SWQL Studio, It looks like the first parameter is path.  I've looked everywhere but cannot find what path it is looking for.  When running the command in PS, ( Invoke-swisverb $swis Orion.MapStudioFiles InsertFile @("/Orion/Orion.MapStudioFiles","TestMap1","caustin",0,$now)  always get " Invoke-SwisVerb : Verb Orion.MapStudioFiles.InsertFile cannot unpackage parameter 1" 

       

      Can anyone point me in the right direction?

       

      Thanks!!

        • Re: Invoke-SwisVerb to create new MapStudio File
          tdanner

          This is not really something we recommend you do. We don't have any documentation for that file format. That said, if you do want to try it the parameters for InsertFile are:

           

          1. path - this is the filename that Network Atlas will know the file as, not the path of the file you are uploading. It corresponds to the FileName property of Orion.MapStudioFiles.

          2. imageFile - this is the actual contents of the file you are uploading, as a byte array. You can get this in PowerShell by doing [IO.File]::ReadAllBytes(path-to-file).

          3. owner - the AccountID of the Orion account that should be the owner of this file.

          4. fileType - the relevant values are 0 (a map file) and 2 (a background image)

          5. timestamp

          1 of 1 people found this helpful