Hallo,
Bei der CAD BOM muss ich den Status anzeigen lassen. Bei andern Properties welche ich eingefügt habe, funktioniert alles.
CAD BOM.xml
<DataGridTextColumn x:Name="clmState" Binding="{Binding State}" >
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.UIString[LBL14], RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
FileBOM.ps1
Add-Type @'
public class myBom
{
public int Position;
public string PartNumber;
public string ComponentType;
.
.
public string Company;
public string Subject;
public string State;
}
'@
$m_Prop = $cldBom.PropArray | Where-Object { $_.dispName -eq "Company"}
$prop = $cldBom.CompAttrArray | Where-Object { $_.PropId -eq $m_Prop.Id}
$bomItem.Company = $prop.Val
$m_Prop = $cldBom.PropArray | Where-Object { $_.dispName -eq "Subject"}
$prop = $cldBom.CompAttrArray | Where-Object { $_.PropId -eq $m_Prop.Id}
$bomItem.Subject = $prop.Val
$m_Prop = $cldBom.PropArray | Where-Object { $_.dispName -eq "State"}
$prop = $cldBom.CompAttrArray | Where-Object { $_.PropId -eq $m_Prop.Id}
$bomItem.State = $prop.Val
}
Wo ist das Problem?
Hi,
Is this still an issue that you are facing? If not, then you can ignore this reply.
Regarding the property "State", does it exist? Maybe that is the problem that the other properties works because they actually exist.
You can use the $dsDiag.Inspect() to find out $cldBom.PropArray contains the property "State" or not.
Hope it helps!
Wangdu
coolOrange
Can't find what you're looking for? Ask the community or share your knowledge.