Message 1 of 3
Merging two rules

Not applicable
08-15-2020
09:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi to all,
I have two rules. One writes the material name in the user's iProperties and the other writes the stock number in the "Stock number" iProperties. Both take information from the materials database. I need to merge these two rules to run at the same time.
The first rule
Dim oDoc As PartDocument = ThisDoc.Document iProperties.Value("Custom", "Materiál") = oDoc.ActiveMaterial.DisplayName
The second rule
If ThisApplication.ActiveDocumentType <> kPartDocumentObject Then Exit Sub Dim oDoc As PartDocument oPartDoc = ThisApplication.ActiveDocument Dim oMat As Asset oMat = oPartDoc.ActiveMaterial iProperties.Value("Project", "Stock number") = oMat.Item("physmat_Comments").Value