
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I need some help with working with pattern and using ilogic.
I have a main assembly A2.iam.
Inside A2.iam I have a subassembly A1.iam.
Inside A1.iam I have a pattern "Pat 01".
I need to supress some elements of this pattern (not a whole pattern) with an external rule, running from main assembly (A2.iam).
So inside subassembly A1.iam I have a rule which looks like this:
Dim oDoc As AssemblyDocument oDoc = ThisApplication.ActiveDocument Dim oPattern1 As OccurrencePattern oPattern1 = oDoc.ComponentDefinition.OccurrencePatterns.Item("Pat 01") Dim oElement1 As OccurrencePatternElement oPattern1.OccurrencePatternElements.Item(2).Suppressed = True
This rule will suppress second element of this pattern. It works when run from subassembly level.
I want to run this rule with an external rule in main assembly, which looks like this:
iLogicVb.RunRule("A 1:1", "Rule1")
However when I run this external rule it doesn't work - I get an error message.
I know the reason for this - when running an external rule it looks for a pattern in main assembly and not in subassembly.
Do you know solution for this?
Solved! Go to Solution.