VDS 2017 - Save without folder selection

VDS 2017 - Save without folder selection

Jens.Bruhn
Enthusiast Enthusiast
674 Views
3 Replies
Message 1 of 4

VDS 2017 - Save without folder selection

Jens.Bruhn
Enthusiast
Enthusiast

Hi,

 

I'm using the VDS2017 Addin for Inventor with the default configuration (bread crumb and dynamic properties).
Is there an easy way to prevent that a user saves a new file without selecting any folder?
The OK Button get active when all required values of the category are filled. The user can hit OK and the file is saved in the root of the working directory.
I'd like to achieve that at least the first folder from my structure is selected.

 

Best regards,
Jens

0 Likes
Accepted solutions (1)
675 Views
3 Replies
Replies (3)
Message 2 of 4

Markus.Koechl
Autodesk
Autodesk

My quick suggestion/test to solve this: add a property, e.g. "FirstFolder" to Inventor.CFG to store the breadcrumb's first item's selection. Use this property in the same way as the default does for the full path:

OnSelectionChanged
...
$Prop["Folder"].Value = $path
$_FirstFolder = $breadCrumb.Children[0].SelectedValue.Name
$dsDiag.Trace(" First Folder: $_FirstFolder")
AddCombo -data $sender.SelectedItem
...

If the property is set to RequiresValue="true" the OK button will disable until a value is selected. 



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 3 of 4

Jens.Bruhn
Enthusiast
Enthusiast

Hi Markus,

 

thanks a lot. I think there is missing a little bit:

 

...
$_FirstFolder = $breadCrumb.Children[0].SelectedValue.Name
$Prop["FirstFolder"].Value = $_FirstFolder
...

I also wrote some code for the _EditMode inside the Default.ps1 . Otherwise there is a problem when you try to edit the datasheet for existing files.
Now all works fine.

Thank again for your hint and best regards,

 

Jens

 

 

0 Likes
Message 4 of 4

Markus.Koechl
Autodesk
Autodesk
Accepted solution
Glad to see that you get the task solved. "Quick suggestion" meant solution principle, not the complete code ;).


Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes