Place an iLogic Assembly in another assembly

Place an iLogic Assembly in another assembly

darok8
Participant Participant
371 Views
3 Replies
Message 1 of 4

Place an iLogic Assembly in another assembly

darok8
Participant
Participant

Hi everyone, I'm new to iLogic and I felt the need to use ilogic to automate some of my work processes, so I made an assembly with instructions in iLogic, it's very basic (I think so)...

 

If ElementContact_left = "none" Then
	Component.IsActive("M22_K10:1") = False
	Component.IsActive("M22_K01:1") = False
End If
If ElementContact_left = "NO" Then
	Component.IsActive("M22_K10:1") = True
	Component.IsActive("M22_K01:1") = False
End If
If ElementContact_left = "NC" Then
	Component.IsActive("M22_K10:1") = False
	Component.IsActive("M22_K01:1") = True
End If

 

Prior to the code, make the variable "ElementContact_left" and add a new "level of detail" called iLogic, and the code works fine for me in the same assembly, but at the time of said assembly, insert it through "place ilogic component" in another assembly, I It throws an error message that it can't find the piece to leave unsuppress, I don't know what I'm missing, I hope it was clear...

 

darok8_0-1680221637157.pngdarok8_1-1680221776279.png

 

0 Likes
Accepted solutions (1)
372 Views
3 Replies
Replies (3)
Message 2 of 4

A.Acheson
Mentor
Mentor
Accepted solution

Hi @darok8 

What is needed is to stabilize the occurrence name so the code reference this static name and not the occurrence name which under normal circumstances changes when the filename is change.See this article for extra explanation of what is happening

 

Component.IsActive("M22_K10") = False

 

 

Edit:

On further reading your model still has the same occurrence name. Is this the case? 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 4

darok8
Participant
Participant

Hi @A.Acheson 

 

Oh I understand, thank you for the answer

0 Likes
Message 4 of 4

darok8
Participant
Participant

Hi @A.Acheson 

 

Oh I understand, thank you for the answer

0 Likes