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

아이로직에서 구성요소 패턴의 0번째 요소만 억제하고 싶습니다.

leetg1
Enthusiast

아이로직에서 구성요소 패턴의 0번째 요소만 억제하고 싶습니다.

leetg1
Enthusiast
Enthusiast

안녕하세요. 제목 그대로 어떠한 조건이 제공 되었을 때 구성요소 패턴을 통째로 억제 하는 것이 아니라, 구성요소 패턴에 있는 5번째 요소만 억제를 하고 싶습니다. 로직에서 패턴의 요소를 선택하는 구문이 있을까요?

Reply
Accepted solutions (2)
519 Views
5 Replies
Replies (5)

doohyun.kimRP8YD
Autodesk
Autodesk
Accepted solution

하기 내용은 첫 번째 원형패턴의 5번 째 구성요소를 억제하는 구문 입니다.

Dim oPartDocument As PartDocument = ThisDoc.Document
Dim oCircularPatternFeature As CircularPatternFeature = oPartDocument.ComponentDefinition.Features.CircularPatternFeatures.Item(1)
Dim oFeaturePatternElement As FeaturePatternElement = oCircularPatternFeature.PatternElements.Item(5)

oFeaturePatternElement.Suppressed = True
iLogicVb.UpdateWhenDone = True

 

손광호
Collaborator
Collaborator

안녕하세요...

질문에 대한 답을 해주셔서 감사합니다.

같은 개념이긴 하지만 부품이 아닌 조립품에서 부품을 직사각형 패턴으로 한 경우에는

부품 패턴의 몇 번째 부품을 억제하는 구문이 필요한 경우에는 어떻게 되나요?

 

_0-1713326534640.png

 

 

줌인테크 Techanical Support Engineer

yd_kwon
Advocate
Advocate

 

Dim oDoc As AssemblyDocument = ThisDoc.Document

Dim oPattern As OccurrencePattern 
oPattern = oDoc.ComponentDefinition.OccurrencePatterns.Item(1) 

Dim oComponent As ComponentOccurrence
oComponent = oPattern.OccurrencePatternElements.Item(5).Components.Item(1)

oComponent.Suppress

 

참고한 링크

 

조립품의 첫번째 구성요소 패턴에서 5번째 구성요소를 억제하는 코드입니다.

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

손광호
Collaborator
Collaborator

답변 감사합니다.

조립품의 패턴 요소를 억제하는 내용으로 잘 동작합니다.

혹 추가로 하기 이미지처럼 알려주신 코드를 활용하면 

패턴 요소의 부품이 억제되는데 

두 개의 부품을 패턴한 경우에는 한 개만 억제되네요.

혹 패턴된 도면 요소의 여러 부품을 같이 억제할 수 있을까요?

_0-1713398427022.png

 

 

줌인테크 Techanical Support Engineer

yd_kwon
Advocate
Advocate
Accepted solution

 

Dim oDoc As AssemblyDocument = ThisDoc.Document

Dim oPattern As OccurrencePattern 
oPattern = oDoc.ComponentDefinition.OccurrencePatterns.Item(1) 

Dim oComponets As ComponentOccurrences
oComponents = oPattern.OccurrencePatternElements.Item(5).Components

For Each oComps As ComponentOccurrence In oComponents
	oComps.Suppress
Next

 

 

조립품 문서에서 5번째 패턴의 모든 요소를 억제하는 코드입니다.

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