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
Solved! Go to Solution.
Solved by an42drew. Go to Solution.
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
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
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
Can't find what you're looking for? Ask the community or share your knowledge.