Inventor Customization

Inventor Customization

Reply
Valued Contributor
abilabib
Posts: 65
Registered: ‎10-23-2010
Message 1 of 11 (727 Views)

iLogic Update iProperties

727 Views, 10 Replies
11-01-2010 10:43 PM

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

Employee
MjDeck
Posts: 959
Registered: ‎02-24-2009
Message 2 of 11 (705 Views)

Re: iLogic Update iProperties

11-02-2010 01:36 PM 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
DLS - Mechanical Design
Autodesk, Inc.

Valued Contributor
abilabib
Posts: 65
Registered: ‎10-23-2010
Message 3 of 11 (699 Views)

Re: iLogic Update iProperties

11-02-2010 05:59 PM 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

 


 

Employee
MjDeck
Posts: 959
Registered: ‎02-24-2009
Message 4 of 11 (697 Views)

Re: iLogic Update iProperties

11-02-2010 06:06 PM 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
DLS - Mechanical Design
Autodesk, Inc.

Valued Contributor
abilabib
Posts: 65
Registered: ‎10-23-2010
Message 5 of 11 (692 Views)

Re: iLogic Update iProperties

11-02-2010 08:43 PM in reply to: abilabib

From string parameter.

 

 

Employee
MjDeck
Posts: 959
Registered: ‎02-24-2009
Message 6 of 11 (669 Views)

Re: iLogic Update iProperties

11-03-2010 08:37 AM 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
DLS - Mechanical Design
Autodesk, Inc.

Valued Contributor
abilabib
Posts: 65
Registered: ‎10-23-2010
Message 7 of 11 (655 Views)

Re: iLogic Update iProperties

11-03-2010 05:58 PM in reply to: abilabib

Here's My part.

 

 

Employee
MjDeck
Posts: 959
Registered: ‎02-24-2009
Message 8 of 11 (649 Views)

Re: iLogic Update iProperties

11-03-2010 08:40 PM 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
DLS - Mechanical Design
Autodesk, Inc.

Valued Contributor
abilabib
Posts: 65
Registered: ‎10-23-2010
Message 9 of 11 (644 Views)

Re: iLogic Update iProperties

11-03-2010 10:42 PM 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

Employee
MjDeck
Posts: 959
Registered: ‎02-24-2009
Message 10 of 11 (633 Views)

Re: iLogic Update iProperties

11-04-2010 09:16 AM 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
DLS - Mechanical Design
Autodesk, Inc.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.