Cannot suppress the first element of the pattern

Cannot suppress the first element of the pattern

sevaslan
Contributor Contributor
327 Views
3 Replies
Message 1 of 4

Cannot suppress the first element of the pattern

sevaslan
Contributor
Contributor

Hi,

I'm trying to run a rule to suppress elements of a pattern. When I try to run the rule for Element1 it didn't work but it works for other elements. Any ideas?

			If [arka] = True Then 
				
			

				Dim oDoc As AssemblyDocument
				oDoc = ThisApplication.ActiveDocument
				Dim oPattern As OccurrencePattern
				oPattern = oDoc.ComponentDefinition.OccurrencePatterns.Item("Component Pattern 10:1") 
				Dim oElement As OccurrencePatternElement
				oPattern.OccurrencePatternElements.Item(1).Suppressed=False
         
          Else 
				Dim oDoc As AssemblyDocument
				oDoc = ThisApplication.ActiveDocument
				Dim oPattern As OccurrencePattern
				oPattern = oDoc.ComponentDefinition.OccurrencePatterns.Item("Component Pattern 10:1")
				Dim oElement As OccurrencePatternElement
				oPattern.OccurrencePatternElements.Item(1).Suppressed = True
         
          End If

 

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

Michael.Navara
Advisor
Advisor

This is how Inventor works. Suppress the first element in pattern is not possible in both ways (UI/API)

0 Likes
Message 3 of 4

sevaslan
Contributor
Contributor

If i need to deactivate the first element what else can i do? Is there any other way?

0 Likes
Message 4 of 4

Michael.Navara
Advisor
Advisor
Accepted solution

For example you need to redefine pattern and start from second position. Or you can place components to its right position one by one (without pattern)

0 Likes