CreateMode & EditMode

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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