Way to create independent copy of iLogic-driven assembly (subcomponent references by filename)

Way to create independent copy of iLogic-driven assembly (subcomponent references by filename)

Maxim-CADman77
Advisor Advisor
175 Views
1 Reply
Message 1 of 2

Way to create independent copy of iLogic-driven assembly (subcomponent references by filename)

Maxim-CADman77
Advisor
Advisor

I'd like to know if there a way to create healthy independent copy of iLogic-driven assembly in case subcomponents are referenced by filename (ex. "Components.Add" method used like here), or if there a smarter way to control component presence conditionally? 

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
176 Views
1 Reply
Reply (1)
Message 2 of 2

daltonNYAW9
Advocate
Advocate

Edit***

Just realised this would work the same if you just manually named your occurrences. Only other thing I can think of would be to link parameters of the files you wanted to use and extract the 'filename' that way

 

You could store the rule in the component's file and run the rule from the assembly. 
Ex:
(Assembly)

objProvider = iLogicVb.CreateObjectProvider(ThisDoc.Document)
Dim map As Inventor.NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap()
map.Add("objProvider", objProvider)

iLogicVb.RunRule("test", "Rule0", map)

 

(Part)

 

Dim objprovider As IStandardObjectProvider
objprovider = RuleArguments("objProvider")
MessageBox.Show(objprovider.ThisAssembly.Document.DisplayName)

objProvider.ThisAssembly.Components("test").Occurrence.Suppress

 

0 Likes