Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Checking whether the part is in the Assembly, ilogic

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Rogov_Sergey
404 Views, 1 Reply

Checking whether the part is in the Assembly, ilogic

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
Инженер-конструктор

1 REPLY 1
Message 2 of 2

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

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report