Inventor General Discussion

Inventor General Discussion

Reply
Active Member
an42drew
Posts: 7
Registered: ‎12-12-2013
Message 1 of 5 (207 Views)
Accepted Solution

ilogic rule parameter gets stuck regardless of change

207 Views, 4 Replies
02-14-2014 12:49 PM

Hello,

 

This is the code:

 


If SDU_Through_Ceiling = "Yes" Then
Parameter("Raceway Roof:1", "Width") = Raceway_Width
Parameter("Raceway Roof:2", "Width") = Raceway_Width
Parameter("Raceway Roof:3", "Width") = Raceway_Width
Component.IsActive("Riser Top:1") = True
Component.IsActive("Riser Top:2") = True
Component.IsActive("Riser Infil:5") = True
Component.IsActive("Riser Infil:6") = True
Component.IsActive("Riser Infil Top:1") = True
Component.IsActive("Riser Infil Top:2") = True
Component.IsActive("Riser Panel:1") = True
Component.IsActive("Riser Panel:2") = True
Else If SDU_Through_Ceiling = "No" AndAlso Width < 2500
Parameter("Raceway Roof:1", "Width") = Raceway_Width+Riser_Width+Riser_Width
Component.IsActive("Riser Top:1") = False
Component.IsActive("Riser Top:2") = False
Component.IsActive("Riser Infil:5") = False
Component.IsActive("Riser Infil:6") = False
Component.IsActive("Riser Infil Top:1") = False
Component.IsActive("Riser Infil Top:2") = False
Component.IsActive("Riser Panel:1") = False
Component.IsActive("Riser Panel:2") = False
Else If SDU_Through_Ceiling = "No" AndAlso Width >= 2500 And Width < 4500 Then
Parameter("Raceway Roof:1", "Width") = Raceway_Width+Riser_Width
Parameter("Raceway Roof:2", "Width") = Raceway_Width+Riser_Width
Component.IsActive("Riser Top:1") = False
Component.IsActive("Riser Top:2") = False
Component.IsActive("Riser Infil:5") = False
Component.IsActive("Riser Infil:6") = False
Component.IsActive("Riser Infil Top:1") = False
Component.IsActive("Riser Infil Top:2") = False
Component.IsActive("Riser Panel:1") = False
Component.IsActive("Riser Panel:2") = False
Else If SDU_Through_Ceiling = "No" AndAlso Width >= 4500 Then
Parameter("Raceway Roof:1", "Width") = Raceway_Width+Riser_Width
Parameter("Raceway Roof:2", "Width") = Raceway_Width
Parameter("Raceway Roof:3", "Width") = Raceway_Width+Riser_Width
Component.IsActive("Riser Top:1") = False
Component.IsActive("Riser Top:2") = False
Component.IsActive("Riser Infil:5") = False
Component.IsActive("Riser Infil:6") = False
Component.IsActive("Riser Infil Top:1") = False
Component.IsActive("Riser Infil Top:2") = False
Component.IsActive("Riser Panel:1") = False
Component.IsActive("Riser Panel:2") = False
End If


The red text is where i am having problems.
The rule seems to run fine up to the point of "Width" going over 4500.
The parameters Parameter("Raceway Roof:1", "Width") Parameter("Raceway Roof:2", "Width") Parameter("Raceway Roof:3", "Width")
dont change no matter what value i give them


Any help would be much appreciated








Active Contributor
akhidrosyidi
Posts: 41
Registered: ‎06-13-2013
Message 2 of 5 (188 Views)

Re: ilogic rule parameter gets stuck regardless of change

02-14-2014 07:53 PM in reply to: an42drew

hi, can you attach the model included your ilogic here?

 

daily works with :
-----------------------------------------------------------------------------------------
Autodesk Inventor Profesional 2014.
AutoCAD Mechanical 2014.
Autodesk Vault Profesional 2014.
Active Member
an42drew
Posts: 7
Registered: ‎12-12-2013
Message 3 of 5 (183 Views)

Re: ilogic rule parameter gets stuck regardless of change

02-15-2014 03:14 AM in reply to: an42drew

Hi,

 

I'd rather not put the whole model on, but i will try tonight to make a smaller model with just the problem parts.See if i can work it out that way. If not i will put that one on here.

I keep staring at the code but just cant seem to see whats wrong. It must be something else conflicting with this part.

 

Thanks

Active Member
an42drew
Posts: 7
Registered: ‎12-12-2013
Message 4 of 5 (172 Views)

Re: ilogic rule parameter gets stuck regardless of change

02-15-2014 12:38 PM in reply to: an42drew
 

Here is a small assembly with the bit i am struggling with

 

 

In the last piece of the code

Else If SDU_Through_Ceiling = "No" AndAlso Width >= 4500 Then
Parameter("Raceway Roof:1", "Width") = Raceway_Width+Riser_Width
Parameter("Raceway Roof:2", "Width") = Raceway_Width
Parameter("Raceway Roof:3", "Width") = Raceway_Width+Riser_Width

 Raceway Roof 2 should be a Riser Width shorter than the other two but it isnt

 

 

Thanks

 
Active Member
an42drew
Posts: 7
Registered: ‎12-12-2013
Message 5 of 5 (156 Views)

Re: ilogic rule parameter gets stuck regardless of change

02-16-2014 12:42 PM in reply to: an42drew

I feel like a bit of a fool, and find it hard to believe i havent come across this situation before.

Turns out the problem was not with the code but the fact i was trying to make the same parameter in duplicated components behave differently.

I simply solved this by saving the component two more times under different names and adapted the code to suit those names.

Oh well you live and learn!

 

Thanks anyway

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.