Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Ilogic 이벤트 트리거 관련

ickis1492
Enthusiast

Ilogic 이벤트 트리거 관련

ickis1492
Enthusiast
Enthusiast

Ilogic 이벤트 트리거 관련 하여 테스트 로직을 작성하고 여러 이벤트 상황에 넣어 봤지만 작동을 하지 않네요.

일단 규칙만 실행하면 작동은 됩니다. 

각 이벤트 트리거 별 규칙이 있는지 이벤트 트리거를 작동 시키기 위해서는 어떤 특정한 구문을 추가해야 하는지 

알고 싶습니다.

 

 

ickis1492_0-1703117237484.png

 

사용된 규칙은 아래와 갈습니다.

 

Dim oDef As ComponentDefinition = ThisDoc.Document.ComponentDefinition
Dim oPDef As PartComponentDefinition = ThisDoc.Document.ComponentDefinition
Dim oFeature As PartFeature
Dim oFeatures As PartFeatures = oDef.Features
Dim oHole As HoleFeature
Dim oHoles As HoleFeatures = oFeatures.HoleFeatures
Dim oThreadFeats As ThreadFeatures = oPDef.Features.ThreadFeatures


' - 색상 지정
Dim M3 As String = "일반 남색"
Dim M4 As String = "PINK"
Dim M5 As String = "일반 적색"
Dim M6 As String = "일반 노란색"
Dim M8 As String = "일반 초록색"
Dim M10 As String = "일반 보라색"
Dim M12 As String = "일반 주황색"
Dim M16 As String = "일반 청색"
Dim others As String = "일반 검은색"

For Each oHole In oHoles
	If oHole.Tapped = True
		currentType = Feature.ThreadDesignation(oHole.Name)
		If currentType = "M3x0.5" Then
			Feature.Color(oHole.Name) = M3
		ElseIf currentType = "M4x0.7" Then
			Feature.Color(oHole.Name) = M4
		ElseIf currentType = "M5x0.8" Then
			Feature.Color(oHole.Name) = M5
		ElseIf currentType = "M6x1" Then
			Feature.Color(oHole.Name) = M6
		ElseIf currentType = "M8x1.25" Then
			Feature.Color(oHole.Name) = M8
		ElseIf currentType = "M10x1.5" Then
			Feature.Color(oHole.Name) = M10
		ElseIf currentType = "M12x1.75" Then
			Feature.Color(oHole.Name) = M12
		ElseIf currentType = "M16x2" Then
			Feature.Color(oHole.Name) = M16
		Else
			Feature.Color(oHole.Name) = others
		End If
	Else
		dim HoleType as String = oHole.ClearanceInfo.FastenerSize
		If HoleType = "M3" Then
			Feature.Color(oHole.Name) = M3
		ElseIf HoleType = "M4" Then
			Feature.Color(oHole.Name) = M4
		ElseIf HoleType = "M5" Then
			Feature.Color(oHole.Name) = M5
		ElseIf HoleType = "M6" Then
			Feature.Color(oHole.Name) = M6
		ElseIf HoleType = "M8" Then
			Feature.Color(oHole.Name) = M8
		ElseIf HoleType = "M10" Then
			Feature.Color(oHole.Name) = M10
		ElseIf HoleType = "M12" Then
			Feature.Color(oHole.Name) = M12
		ElseIf HoleType = "M16" Then
			Feature.Color(oHole.Name) = M16
		Else
			Feature.Color(oHole.Name) = others
		End If
	End If

Next


'InventorVb.DocumentUpdate() - 혹시나 해서 아래 구문과 테스트 해봤음.
iLogicVb.UpdateWhenDone = True

 

0 Likes
Reply
Accepted solutions (1)
372 Views
7 Replies
Replies (7)

yd_kwon
Advocate
Advocate

이벤트 트리거를 체크하시려면 가장 빠른 방법은 메세지 창을 띄우는 거라 생각합니다.

제가 봤을 때, 이벤트 트리거가 문제가 아니라 로직 문제로 보입니다.

 

혹시 테스트 문서(파일)만 작동되고, 나머지 문서에는 작동되지 않으신 건가요? 지정된 색상(모양)이 각 문서에 추가가 되지 않은 것으로 보입니다.

 

샘플 파일을 올려주셔야 더 상세한 답변을 드릴 수 있을 것 같습니다.

CAM-Fusion 360/Inventor
CAD-Fusion 360/Inventor
Before PowerMILL
0 Likes

ickis1492
Enthusiast
Enthusiast

메시지 창 으로 확인해 봤을 때는 규칙 단독으로는 작동 됩니다.

ickis1492
Enthusiast
Enthusiast
아래 파일인데... 지금.. 다른 컴퓨터로 사용해보니.. 다른 컴퓨터에서는 정상 작동 합니다.
제 인벤터 설치 혹은 셋팅에 문제가 있는 것 같은데 확인 할 수있는 방법이 있을까요?
0 Likes

yd_kwon
Advocate
Advocate

전 Inventor Professional 2024.2 사용중입니다.

 

링크 글을 보시면 새 프로젝트 생성해서 테스트 하니 문제 없었다 라는 글이 있습니다. 영문 커뮤니티를 뒤져봐도, 확인이 쉽지 않네요.

CAM-Fusion 360/Inventor
CAD-Fusion 360/Inventor
Before PowerMILL
0 Likes

ickis1492
Enthusiast
Enthusiast
인벤터를 다시 깔아보는 것이 좋을 것 갈네요.. 멀쩡히 설치되어 있는 엑셀도 설치가 되어 있지 않다고 나오니
번거롭더라도 해보겠습니다.

ickis1492
Enthusiast
Enthusiast
인벤터 프로그램을 다시 깔아도 문제가 해결 되지 않네요.
0 Likes

ickis1492
Enthusiast
Enthusiast
Accepted solution

이벤트 트리거에 옵션 설정을 확인하니 되었습니다.

ickis1492_0-1703558299436.png