Inventor General Discussion

Inventor General Discussion

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

ilogic rule parameter gets stuck regardless of change

215 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








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

Active Contributor
akhidrosyidi
Posts: 45
Registered: ‎06-13-2013
Message 2 of 5 (196 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 (191 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 (180 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 (164 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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!