Skip to content

Commit

Permalink
Switched Settings to use ArgumentToConfigurationDataTransformation at…
Browse files Browse the repository at this point in the history
…tribute
  • Loading branch information
MikeShepard committed Aug 25, 2016
1 parent a70177f commit 9b7faf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Examples/VisioSettingsExample.ps1
Expand Up @@ -9,7 +9,7 @@ $doc=Get-VisioDocument
Set-VisioDiagramServices -Document $doc -Value $vis.ServiceAll

#adjust path to match the location you put the setting file.
Import-VisioSettings -path C:\Users\mike\Documents\WindowsPowerShell\modules\VisioBot3000\Examples\DiagramSettings.psd1
Import-VisioSettings -settings C:\Users\mike\Documents\WindowsPowerShell\modules\VisioBot3000\Examples\DiagramSettings.psd1

#draw a container with two items in it
Domain MyDomain {
Expand Down
5 changes: 1 addition & 4 deletions VisioSettings.ps1
Expand Up @@ -28,10 +28,7 @@
#>
function Import-VisioSettings{
[CmdletBinding()]
Param([string]$path)
$dir=Split-Path -Path $path -Parent
$file=split-path -Path $path -leaf
$settings=Import-LocalizedData -FileName $file -BaseDirectory $dir
Param([Microsoft.PowerShell.DesiredStateConfiguration.ArgumentToConfigurationDataTransformation()]$settings)
if($settings.StencilPaths){
$settings.StencilPaths | foreach-object {Add-StencilSearchPath -Path $_}
}
Expand Down

0 comments on commit 9b7faf4

Please sign in to comment.