Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic Update iProperties

10 REPLIES 10
Reply
Message 1 of 11
abilabib
1182 Views, 10 Replies

iLogic Update iProperties

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

10 REPLIES 10
Message 2 of 11
MjDeck
in reply to: abilabib

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?


Mike Deck
Software Developer
Autodesk, Inc.

Message 3 of 11
abilabib
in reply to: abilabib

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

 


 

Message 4 of 11
MjDeck
in reply to: abilabib

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?


Mike Deck
Software Developer
Autodesk, Inc.

Message 5 of 11
abilabib
in reply to: abilabib

From string parameter.

 

 

Message 6 of 11
MjDeck
in reply to: abilabib

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)?

 


Mike Deck
Software Developer
Autodesk, Inc.

Message 7 of 11
abilabib
in reply to: abilabib

Here's My part.

 

 

Message 8 of 11
MjDeck
in reply to: abilabib

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.

 


Mike Deck
Software Developer
Autodesk, Inc.

Message 9 of 11
abilabib
in reply to: abilabib

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

Message 10 of 11
MjDeck
in reply to: abilabib

Abi,

 

 Remove the line:

 

DwgNumber = TankCode & "-" & ItemNumber

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.

 


Mike Deck
Software Developer
Autodesk, Inc.

Message 11 of 11
abilabib
in reply to: abilabib

Hi Mike,

 

Thanks for your explanation. It's solve now. Nice to meet you.

 

regards,

 

Abi Labib

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

Post to forums  

Autodesk Design & Make Report