External rules broken in 2016

External rules broken in 2016

mrattray
Advisor Advisor
337 Views
1 Reply
Message 1 of 2

External rules broken in 2016

mrattray
Advisor
Advisor

I've been having issues with rule behaviour changing inexplicably ever since switching to 2016. There are two issues that I am experiencing. I've found a workaround to the first issue by removing my use of the IsDirty property, which was inexplicably broken in 2016, but I still have another, weirder, issue with a much less satisfactory workaround. Here's my last thread about the IsDirty issue here. I'm doing fine with the workaround, but I still don't know why what has been working great for 4 years doesn't any more.

 

My other issue is still unresolved:

I've been using another workaround to deal with the limitation that external rules cannot be added to event triggers programmatically at least since version 2014. I create an internal rule with a line that calls the external rule and then add that internal rule to the event triggers via the external rule's code. (Read that a couple times, I know, it's wierd.) Starting in 2016 (this was NEVER an issue in 2015 and earlier) my internal rule throws an "external rule not found" error whenever it tries to run. The workaround is to manually run the external rule once by right clicking on it and selecting run rule in the browser window. Once I've done this it seems to cure the rule not found issue for that session, but only for that session. I'm blaming the problem on the new folders implemented into the external rules browser, since that's the only thing I'm aware of that changed.

 

I realize that this isn't an earth shattering issue in AutoDesk's eyes and that it only affects a very small minority of users, but any good programmer should treat any regression seriously.

Mike (not Matt) Rattray

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

Owner2229
Advisor
Advisor

Hi, I'm ussing this code (in attachment) to add external rules to event triggers in my drawings. Had no issues with it yet. It basicaly copies the event triggers settings from a template document. You can give it a try. Most of the code I found here in this forum.

Im ussing there iProperty "Info-1" to identify documents where the rule runed already, you can delete that part.

 

Sorry for my english.

Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods
0 Likes