EVENT TRIGGERS & EXTERNAL RULES

EVENT TRIGGERS & EXTERNAL RULES

Anonymous
Not applicable
994 Views
5 Replies
Message 1 of 6

EVENT TRIGGERS & EXTERNAL RULES

Anonymous
Not applicable

1. If every part in an assymbly has a trigger to run before or after save. Will it trigger on each saving of the main assymbly? Will this eat up computer resources to have rules running when they are not needed? The rules I am talking about are very simple like mass model properties to custom prop & shetmetal style update. I just want to know the long term if every part always has a trigger on save.

 

 

0 Likes
995 Views
5 Replies
Replies (5)
Message 2 of 6

Ralf_Krieg
Advisor
Advisor

Hello

 

I hope i understand your question right.

 

Inventor only saves the parts in an assembly, that are changed. You can see this by the dialog that appears, where you can select wether a part/subassembly should be saved or not. If a part in your assembly don't have changes, Inventor will not save this part and there will no OnSave-events firing for this part.


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 3 of 6

Anonymous
Not applicable

I have a slightly different question on this subject, so I'm going to piggy back on this older thread.

 

If I have an external rule, how do I set it up to trigger on an event (let's say BEFORE SAVE) for all of my files?

It appears that I can only set the event trigger per file?

 

Obviously I can do this in my template, but what about all of my existing files?

 

Is there a way to run an external rule for all file using an event trigger?

Thanks in advance.

0 Likes
Message 4 of 6

MjDeck
Autodesk
Autodesk

Sorry, there's no way to set a rule to run in all files on a given event.  We're thinking of adding that capability in a future version.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 5 of 6

Anonymous
Not applicable

Does this capability exist yet?  We would like to trigger an illogic external rule with every file that is saved.  Currently, the event triggers checked to run will only run after the event triggers are set within each file.  This does not help for the thousands of existing files.  Is there a simple solution to this that doesn't require lines upon lines of code in VBA, etc?  (I was hoping to keep it as simple as possible).

0 Likes
Message 6 of 6

MechMachineMan
Advisor
Advisor

Hi.

 

Yes this capability does exist, but it is not already implemented.

 

What you end up needing to do is creating an add-in that catches the events.

One way you can do this is to download the SDK and using the instructions supplied there, implement the VBAAutoMacros add-in.

 

-This is the simplest beginner way I have found to make an add-in, and this solution should be in the form of an add-in because it is the only thing that ---can run code on the start-up of the application.

 

You can then make that AutoMacros add-in run another class module macro that starts even tracking.

From there, you can directly implement the solution within that macro, OR use that macro to run external rules based on whatever events you want.

Then, in your external rule you can accomplish the functionality you want.

 

 

I have implemented such a solution for myself so I can get inventor to log every file I ever save so I have record of it since I have a terrible memory.

 

Good luck!


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes