VisioAutomation
VisioAutomation copied to clipboard
Get-VisioScriptingClient seems to be missing from version 4 code
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
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.
I have the same issue. Anyone figure this out?
The Get-VisioScriptingClient command is now called Get-VisioClient I will update the docs.
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