iLogic Triggers

iLogic Triggers

dano0310
Advocate Advocate
1,013 Views
5 Replies
Message 1 of 6

iLogic Triggers

dano0310
Advocate
Advocate

I was just wondering if there is a way to create the propertyset for "iLogicEventsRules"?  I dont have any trouble creating a property set of the same name but it doesn't actually work when triggers are added.  I think the problem is that the internalname is incorrect.  The code I have used to create the set is:-

 

call opartdoc.PropertySets.Add("iLogicEventsRules")

 

This works without crashing.  However I think I need something more along the lines of:-

 

call opartdoc.PropertySets.Add("iLogicEventsRules", "{2C540830-0723-455E-A8E2-891722EB4C3E}")

 

The reason I am trying to do this is because some of out old files from Inventor 11 (not 2011) that were created with the frame generator no longer update there length parameter (G_L) so we are now setting them up to update through a combination of VB.net scripts, iLogic and VBA.  I know sounds rediculous but it works.  THe only trouble being with old parts I can't figure out how to set the triggers therefore I need to set them all manually.

Thanks in advance

Dan

0 Likes
1,014 Views
5 Replies
Replies (5)
Message 2 of 6

dano0310
Advocate
Advocate

Just to bump this back to the top and maybe clarify.  If there is no way to add the property set where are they stored in these old parts?

0 Likes
Message 3 of 6

MegaJerk
Collaborator
Collaborator

Adding the Event Triggers iproperty to files is strange because of how Inventor handles the naming / value / id tag in such a specific way for the event triggers. Near the beginning of the year I made a standalone application that allows you to quickly add iLogic code to a series of parts / assemblies / drawings, with the added bonus of also giving you the ability to select which Event Triggers should be associated with those rules. It has since been updated by the wonderful gentlemen over on the Being Inventive blog, but should still (hopefully) be able to help you in getting your files updated with the rules / event triggers you want. 

If you follow the link at the bottom of my signature, it will take you to the page that has the download link. 

 

Because I tested this initially with 2011 / 2012, I have no real clue if it will work for your release, but can't see too many reasons why it wouldn't. However, if for some reason it doesn't (and you're unable to access the source code included in the download), we can work over the long and short of Event Triggers / Event Trigger iProperties. 

In fact, even if you are unable to access the code / comments, many of my initial discoveries and ramblings about this topic can be found here : http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/API-set-an-Event-Trigger-for-an-ilogic...

 



If my solution worked or helped you out, please don't forget to hit the kudos button 🙂
iLogicCode Injector: goo.gl/uTT1IB

GitHub
0 Likes
Message 4 of 6

dano0310
Advocate
Advocate

Thanks Megajerk

 

After quickly scanning your code I see it is using the same command to add the custom property set as I have tried in inventor 2013.

 

call opartdoc.PropertySets.Add("iLogicEventsRules", "{2C540830-0723-455E-A8E2-891722EB4C3E}")

 

Not that confident to say it but it looks like this wont work in 2013.  The other peculiar things is that when I add a trigger and save it to the Inventor 11 I cannot find where it is storing the information.  One more little bit of information is that the file was migrated to Inventor 2008 where it lost its "smarts" that kept track of the "G_L" value. 

0 Likes
Message 5 of 6

MegaJerk
Collaborator
Collaborator

The problem may be in how you are procceeding after setting the initial iLogic Event Property Set. Each property (In this case, desired Event Trigger), if set incorrectly, will not work no matter what though it certainly will never tell you that. 

Are you currently using 2013 to work on these files? 

If so, can you post a file for me to take a look at? 



If my solution worked or helped you out, please don't forget to hit the kudos button 🙂
iLogicCode Injector: goo.gl/uTT1IB

GitHub
0 Likes
Message 6 of 6

dano0310
Advocate
Advocate

Hi Megajerk

 

The problem isn't with how I am proceeding after as I cannot create the ilogic event property set in the first place.  I am using 2013 but with an Inventor 11 (not 2011) frame generated part.  After having another think about it I tried to run the script on a template part and it worked ok adding the property set.  Soooo I guess it is to do with the old parts architecture.

I have attached it if you or anyone else wants to tear their hair out. 

Dan

0 Likes