I want to use vba to read and write "Description" & "Visualize in the Bill of Material" of selected catia object. I use highlight in the picture below. Help me please, Thank you!
Asked
Active
Viewed 468 times
-1
-
Please have a look at _DescriptionInst_ and _DescriptionRef_ property of the _Product_ object. AFAIK _Visualize in the Bill of Materia_ is not accessible via api. – Shrotter Jun 10 '22 at 08:20
-
@Shrotter, Thanks for your time! It's sad that it's not possible to read "visualize in the Bill of Material" parameter, this causes redundancy when i counting the quantity of part. – Yume Jun 15 '22 at 00:29
1 Answers
0
Dim s as Selection
Set s = Catia.ActiveDocument.selection 'selection of your document
For i = 1 to s.Count2 'if your selection contains more than 1 selection
Dim p as Product
Set p = s.Item2(i).LeafProduct 'leafproduct to get your product
p.DescriptionInst = "test" 'to set your description
Next
It's not possible to get/set Visualize in The Bill of Material

Disvoys
- 61
- 1
- 7