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: 

Vault Data Standard 2017 CAD BOM.xml (Status)

1 REPLY 1
Reply
Message 1 of 2
rolf_klos
407 Views, 1 Reply

Vault Data Standard 2017 CAD BOM.xml (Status)

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?

 

Rolf
1 REPLY 1
Message 2 of 2
wangdu
in reply to: rolf_klos

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

www.coolOrange.com

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

Post to forums  

Autodesk Design & Make Report