How to update iLogic 2010 rule for iProperties because I always need regen all rule for get correct statment. in iLogic 2011 its not problem because have event iProperties Change. So I wondering how to create code or what should I do with iLogic 2010 for Automatically update iProperties ?
Thanks
In Inventor 2010, you can attach the rule to the Before Save Document event. That will update your properties when you save the file. Is that good enough?
I think no. Because I must make sure the properites is correct.
here's my rule :
1. input data BOM
'input Item Number
iProperties.Value
("Project", "Part Number") = ItemNumber
'Input Material
MultiValue.List
("Material") = iProperties.Materials
'Input Description
Description
= iProperties.Value ("Project", "Description")
'Input Dimension
Dimension
= iProperties.Value("Custom", "DIMENSION")
'Input Dwg Number
DwgNumber
= TankCode & "-" & ItemNumber
iProperties.Value
("Custom", "DRAWING NO") = DwgNumber
'Display item Description
ItemDesc
= iProperties.Value("Custom", "ITEM DESCRIPTION")
'Display Stock Number
StockNumber
= iProperties.Value("Project", "Stock Number")
'Input Project Number
iProperties.Value
("Project", "Project") = ProjectNumber
iLogicVb.UpdateWhenDone
= True
2. ItemDescription
If
ItemNumber = "110"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"SHELL"
ElseIf
ItemNumber = "111"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"SHELL 2"
ElseIf
ItemNumber = "120"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"TOP DISHED HEAD"
ElseIf
ItemNumber = "130"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"BOTTOM DISHED HEAD"
ElseIf
ItemNumber = "132"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"INNER BOTTOM CONE"
ElseIf
ItemNumber = "140"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"SUPPORT SKIRT"
ElseIf
ItemNumber = "141"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"SUPPORT LEG"
ElseIf
ItemNumber = "150"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"LIFTING LUG"
ElseIf
ItemNumber = "160"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"NAME PLATE TPSE"
ElseIf
ItemNumber = "170"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"JACKET"
ElseIf
ItemNumber = "180"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"OUTER SHELL"
ElseIf
ItemNumber = "181"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"OUTER SHELL 2"
ElseIf
ItemNumber = "182"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"REINFORCEMENT RING"
ElseIf
ItemNumber = "183"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"INSULATION ROCKWOOL"
ElseIf
ItemNumber = "190"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"INSULATION COVER PART"
ElseIf
ItemNumber = "200"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"PLATFORM SKIRT"
ElseIf
ItemNumber = "220"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"PACKING SKID"
ElseIf
ItemNumber = "300"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"MANHOLE"
ElseIf
ItemNumber = "310"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"GLASS WITH WIPER"
ElseIf
ItemNumber = "320"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"SIGHT GLASS WITH LAMP"
ElseIf
ItemNumber = "330"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"ROTARY SPRAY BALL"
ElseIf
ItemNumber = "340"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"ROTARY JET HEAD"
ElseIf
ItemNumber = "350"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"NON FOAMING INLET"
ElseIf
ItemNumber = "360"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"SIDE CIP FLUSH VALVE"
ElseIf
ItemNumber = "370"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"SAMPLING VALVE"
ElseIf
ItemNumber = "380"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"CONNECTION WITH INSTRUMENT"
ElseIf
ItemNumber = "400"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"AGITATOR UNIT"
ElseIf
ItemNumber = "500"
Then
iProperties.Value
("Custom", "ITEM DESCRIPTION") =
"HOMOGENIZER UNIT"
End If
iLogicVb.UpdateWhenDone
= True
When i change item number, item description isn't changed correctly. I must regen all rule for get the correct item number.
Can u explain me how to solve this problem in ilogic 2010.
thanks,
Abi Labib
Where are you getting the value called itemNumber? Is it a numeric or text parameter? Is it from an Excel spreadsheet?
Can you attach a sample part?
If you use the iLogic Parameters dialog (in Inventor 2010) to change the String parameter named ItemNumber, both those rules should run and your iProperties should update. Can you post the part, or maybe a simplified version of it (without geometry)?
This will work in Inventor 2010 if you change the order of the rules. In the iLogic Tree Editor, drag the ItemDescription rule to the top, before the InputDataBOM rule. You have to hit OK to make the reorder take effect.
This is required because the ItemDescription rule changes the custom ITEM DESCRIPTION property, which is then used as an input to the InputDataBOM rule.
Thank you mike for ur explaination. But 1 problem again about StockNumber. This properties can't update with correct. I have change the rule position but still get wrong properties.
Can u explain Me Mike.
Thank,
Abi Labib
Abi,
Remove the line:
DwgNumber = TankCode & "-" & ItemNumber
from the InputDataBOM rule. Move this line to the top of the ItemDescription rule. (Or you could create a new rule and add this line there.) This will ensure that the DwgNumber is up to date when the InputDataBOM rule runs.