Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Data standard : Use save as

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
fsanchou
759 Views, 11 Replies

Data standard : Use save as

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,

11 REPLIES 11
Message 2 of 12
marco.mirandola
in reply to: fsanchou

Hi, I'm not sure i got your question. You can temporarily disable Data Standard via the ribbon, so that you can save files w/o Data Standard.

can you elaborate your question?

ciao
marco
coolOrange
www.coolorange.com
Message 3 of 12
fsanchou
in reply to: marco.mirandola

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

Message 4 of 12
fsanchou
in reply to: marco.mirandola

Hi Marco, Do you think is it possible to use DS to set iProperties without save automatically the document? Thanks,
Message 5 of 12
marco.mirandola
in reply to: fsanchou

Hi, Data Standard applies the properties only on save, so saving the file is a prerequisite. sorry.
coolOrange
www.coolorange.com
Message 6 of 12
fsanchou
in reply to: marco.mirandola

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

Message 7 of 12
manuel.lanthaler
in reply to: fsanchou

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

Manuel

coolOrange
www.coolOrange.com
––––––––––––––––––
Please mark this response as "Accept as Solution" if it answers your question.
If you have found any post to be helpful, even if it's not a direct solution, then please provide that author kudos.


Message 8 of 12
fsanchou
in reply to: manuel.lanthaler

Hi Manuel, Indeed, I have tried this example, but when I click on button, this is "Save As" dialog box that opens. I do not understand why. If it helps to understand the attached files I use. Thank you very much for your help. Frédéric
Message 9 of 12
fsanchou
in reply to: fsanchou

File here : https://dl.prodware.fr/rub1omn Thank you
Message 10 of 12
manuel.lanthaler
in reply to: fsanchou

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/

 

Manuel

coolOrange
www.coolOrange.com
––––––––––––––––––
Please mark this response as "Accept as Solution" if it answers your question.
If you have found any post to be helpful, even if it's not a direct solution, then please provide that author kudos.


Message 11 of 12
fsanchou
in reply to: manuel.lanthaler

Manuel, This works better Thank you,
Message 12 of 12
fsanchou
in reply to: manuel.lanthaler

Manuel,

 

This works better.

 

Thank you.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report