Good afternoon,
I would like to inform the user if a bushing in an assembly has been altered (there is only a "desired length" parameter to choose the bushing length) and the user does not realize when this happens, therefore it is necessary to inform him. the bushing is parametrized and the different lengths are in a design table.
I created a rule in kwa with the following information:
let OC (integer) /*(old configuration row)*/
let NC (integer) /*(new configuration row)*/
OC = Relations\Table1005c\Configuration /*reads and stores the old configuration row*/
Relations\VB Scripts\Update_Forcado .Run() /*runs VB Script that simply updates the assembly*/
NC=Relations\Table1005c\Configuration /*reads and stores the new configuration row*/
if NC-OC <> 0 /*compares the 2 configuration rows*/
{
Message ("The Bushing has been altered")/*Informs the user that the bushing has been altered*/
}
here is the vba:
Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument
Dim product1 As Product
Set product1 = productDocument1.Product
Set product1 = product1.ReferenceProduct
product1.Update
End Sub
this doesn't work, can anyone tell me why? also, can this be done without using vb scripts?
thanks,
If you want to show a message when the design table configuration changes use a Reaction triggered by the configuration parameter.
The rule does not necessarily fire just because you update the Product.