Checking whether the part is in the Assembly, ilogic

Checking whether the part is in the Assembly, ilogic

Rogov_Sergey
Collaborator Collaborator
450 Views
1 Reply
Message 1 of 2

Checking whether the part is in the Assembly, ilogic

Rogov_Sergey
Collaborator
Collaborator

Hello,

Can you help with the verification rule? 

 

1. There is a variable with a list of values "X" = 1,2,3,4,5,6.

2. If X=1 and part #1 is not in the Assembly, then rule 1 is followed. if X=1 part #1 is in the Assembly, then rule 2 is followed.

3. If X=2 and part #2 is not in the Assembly, then rule 1 is followed. if X=2 part #2 is in the Assembly, then rule 2 is followed.

4. ...



Находите сообщения полезными? Поставьте Нравится (Like) этим сообщениям!
На ваш вопрос успешно ответили? Нажмите кнопку 'Утвердить решение'


Рогов Сергей/ Rogov Sergey
Инженер-конструктор

0 Likes
Accepted solutions (1)
451 Views
1 Reply
Reply (1)
Message 2 of 2

marcin_otręba
Advisor
Advisor
Accepted solution

when x store part number values:

 

 

Dim x As String = "1,2,3,4,5,6,7"
Dim doc As Document
Dim ass As AssemblyDocument = ThisDoc.Document
For Each doc In ass.AllReferencedDocuments
If x.Contains(doc.PropertySets.item(3).Item("Part Number").value) Then ' idk wchat you want to check and compare 
	iLogicVb.RunExternalRule("ruleFileName1")
Else
iLogicVb.RunExternalRule("ruleFileName2")	
End If
Next

 

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes