VisioAutomation icon indicating copy to clipboard operation
VisioAutomation copied to clipboard

Get-VisioScriptingClient seems to be missing from version 4 code

Open tcox8 opened this issue 3 years ago • 1 comments

It appears Get-VisioScriptingClient is missing from version 4.3 and up code. Also missing is the MSAGLLayoutOptions as spelled out in: $options = New-Object VisioAutomation.Models.Layouts.DirectedGraph.MSAGLLayoutOptions

$sc = Get-VisioScriptingClient $sc.Assemblies | %{ Add-Type -Path $_ }

Get-VisioScriptingClient : The term 'Get-VisioScriptingClient' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was 
included, verify that the path is correct and try again.
At line:1 char:7
+ $sc = Get-VisioScriptingClient
+       ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-VisioScriptingClient:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

tcox8 avatar Nov 29 '21 20:11 tcox8

Also note: when attempting to follow the examples from your website (https://saveenr.gitbook.io/visiopowershell/v/visiosps4.0.0docs/automatic-diagrams/drawing-directed-graphs) most of the commands do not work. i.e. $d.AddShape doesn't exist. I have to use $d.AddNode. Similar to the Connectors. I had to use $d.AddEdge. There is also no "render" option $d.rendor produces errors.

tcox8 avatar Nov 29 '21 21:11 tcox8

I have the same issue. Anyone figure this out?

lavermil avatar Apr 05 '23 20:04 lavermil

The Get-VisioScriptingClient command is now called Get-VisioClient I will update the docs.

saveenr avatar Jun 27 '23 15:06 saveenr

Incredibly sorry this took to long to address. I have updated the sample to reflect the latest version: https://saveenr.gitbook.io/visiopowershell/automatic-diagrams/drawing-directed-graphs

saveenr avatar Jun 27 '23 16:06 saveenr