Hi,
I don’t want to limit the save path with Data Standard. Is it possible to choose local path using the Save As dialog box.
How to display this dialog box after click “OK” in Data Standard?
Thanks,
Solved! Go to Solution.
Solved by manuel.lanthaler. Go to Solution.
Hi Marco,
In fact, I would like use Data Standard to set properties's document (Inventor and AutoCAD also, so without iLogic) before choosing the save location path.
Thanks
Hi Marco,
Thank you for your reply,
I am looking to use the tool FolderPicker:
http://blog.coolorange.com/2014/03/28/folderpicker-revisited/
It is written it is possible to select a local folder, I fails to use it.
Do you have an example of using this tool to add a button in DS to choose a local folder before validate.
Thanks
Hi,
you can find an example with local folders here: http://blog.coolorange.com/2013/06/03/folder-picker/ .
To use it in DataStandard you simply have to make a function and call the folderPicker from there:
Xaml:
<Button Content="..." Height="Auto" Command="{Binding PsCmd[OpenFolderPicker]}" />
Powershell:
function OpenFolderPicker { $dir = New-Object System.IO.DirectoryInfo("c:\temp\") $folder = New-Object myFolder($dir) $result = [cOfolderPicker.FolderDialog]::Show($folder) $selectedFolder = $result.SelectedFolder if($result.DialogResult -eq [cOFolderPicker.FolderDialogResult]::OK) { #Folder picked to stuff here.... } }
hope it helps
hi,
i figured out that the folderPicker already has a built in implementation for a SystemFolder.
All you need to do is to load the folderpicker assembly and create a SystemFolder Object.
[System.Reflection.Assembly]::LoadFrom("C:\ProgramData\Autodesk\Vault 2015 R2\Extensions\DataStandard\CAD\addins\cOFolderPicker.dll")
...
function OpenFolderPicker
{
$dsDiag.Trace(" Start FolderPicker")
$dir = New-Object System.IO.DirectoryInfo("c:\temp\")
$folder = New-Object cOFolderPicker.Model.SystemFolder($dir)
$result = [cOfolderPicker.FolderDialog]::Show($folder)
$dsDiag.Trace(" End show")
$selectedFolder = $result.SelectedFolder
if($result.DialogResult -eq [cOFolderPicker.FolderDialogResult]::OK)
{
$dsDiag.Trace(">> FolderPicker OK")
$dsDiag.Trace($selectedFolder)
}
}
Also get sure your using the correct Version of the FolderPicker.dll because your seemed to be corrupted.
You can find it on the GitHub https://github.com/coolOrange-Public/cOfolderPicker/blob/master/Data%20Standard%20Sample/CAD/addins/