Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Recursive External Rule

2 REPLIES 2
Reply
Message 1 of 3
meGVGMF
293 Views, 2 Replies

Recursive External Rule

Hi

 

I'm trying to simplify my life by using recursion with `iLogicVb.Automation.RunExternalRule()`, where the external rule calls itself with a different context document argument.

 

From what I can tell, this isn't possible. I don't get any errors or crashes. It just runs through one level and ends.

 

Is it not possible to call rules recursively?

 

Thanks

2 REPLIES 2
Message 2 of 3
WCrihfield
in reply to: meGVGMF

Good question.  I don't think I have ever tried a 'true' recursive external rule which runs itself again at certain points, in a traditional sense.  However, it does not make sense to me that it would work, because the rule would already be running in Inventor's memory, while it is being called to run again.  I have certainly used recursive Sub routines before many times, and have use tricks like 'GoTo RunAgain' at the end of a process, if certain conditions are right, though.

What sort of process are you trying to automate this way? 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 3
meGVGMF
in reply to: WCrihfield

Thanks for the response.

It could be that it's restricted arbitrarily, to avoid having to deal with the ramifications elsewhere.

But, anyway, like you mention, immediately after posting this and figuring there was no way to push through, I reframed the problem and, instead of putting the rule in the recursion, put the recursion in the rule. It's maybe a little more legible, but instead of recursing to the bottom and building up (addressing parts before their respective assemblies) I put every document gathered into an array and iterate backwards through it.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report