I am building up my DS process and my ps/XAML files are configured using tabs
DWG Props and Parts Properties, depending on which extension is selected eg ipt, iam or dwg then the relevant tabs are shown and hidden, which works fine when creating, saves ok and i can check in to Vault.
But when I come to edit such a file when the XAML fires all the tabs are visible. I am guessing it is something to do with the CreateMode and EditMode, my ps1 file currently only exhibits 'CreateMode'. So do I need to add 'EditMode' to the PS file in someway. PS1 file listed below
Can't really find much info about these two modes and how they work.
Any guidance would be appreciated
Thanks
GW
function InitializeWindow
{
$dSWindow.Width = 600
$dSWindow.Height = 400
#region create mode properties
if($Prop["_CreateMode"].Value)
{
#}
$mWindowName = $dsWindow.Name
switch($mWindowName)
{
"InventorWindow"
{
#region file type settings
if($Prop["_FileExt"].Value -eq "ipt" )
{
$dSWindow.findName("PartsTab").Visibility = $visible
$dSWindow.findName("DWGTab").Visibility = $collapsed
$dSWindow.findName("BuilderTab").Visibility = $collapsed
$dSWindow.findName("PartsTab").IsSelected = "True"
$dSWindow.findName("cmbMat").IsEnabled = "True"
}
elseif ($Prop["_FileExt"].Value -eq "iam" )
{
$dSWindow.findName("PartsTab").Visibility = $visible
$dSWindow.findName("DWGTab").Visibility = $collapsed
$dSWindow.findName("BuilderTab").Visibility = $collapsed
$dSWindow.findName("PartsTab").IsSelected = "True"
$dSWindow.findName("cmbMat").Visibility = $hidden
$dSWindow.findName("lblMaterial").Visibility = $hidden
Hi, i think you already described the solution. in you PS1 you set the visibility for the tabs only if the dialog appears in create mode. So, i't obvious that all the tabs do appear every time after the creation (edit mode). if you like to have the same behavior while creating and editing, and just differentiate by file type, or other properties, then just remove the first if($Prop["_CreateMode"].Value)
is this what you were looking for?
ciao
marco
Sorry Marco
Only just seen your reply.
Yes I do want the same behaviour, so I just need to remove the first ($Prop["_CreateMode"].Value?
The tabs work fine
Thanks for responding
GW