Run rule from subassembly A in subassembly B in the same assembly

Run rule from subassembly A in subassembly B in the same assembly

Anonymous
Not applicable
419 Views
1 Reply
Message 1 of 2

Run rule from subassembly A in subassembly B in the same assembly

Anonymous
Not applicable

Hi!

I have an assembly which only contains an iLogic form and some rules (Assy1). With the form/rules I can search and place other assemblies (Assy2) (in my case a simple frame).

What I am trying to do is place Assy1 in a new assembly, so that I can choose a frame which will also be a subassembly (later on, other components will be placed on the frame, and so far things work). Next thing I want to do is change the Part Number of Assy2 by running a rule from the form of Assy1.

I've tried iProperties.Value etc, but that only works if I place Assy2 in Assy1.

 

My question: Is there a command or something to do this?

(also: I'm not that skilled with iLogic)

 

Thanks in advance 🙂

Regards, Britt

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

WCrihfield
Mentor
Mentor

Have you thought about using external rules and global forms instead of local ones?

Is there some reason why you would need those rules local rather than external?

Here is a sample line of code that will run a rule that is local to another document:

 

iLogicVb.Automation.RunRule(oOtherDoc,"Rule Name")

 

Replace oOtherDoc with either the name of the ComponentOccurrence (including the colon and index number at the end of it, as shown in browser), or the full file name of the other document.

And replace "Rule Name" with the actual name of the rule in that other document you want to run.

Unfortunately, I can't think of a way to open an iLogic form that is local to another document right now, but as I said you could make the form global.

If the form was global, you could use a like like this to run it:

iLogicForm.ShowGlobal("Form 1")

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes