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: 

PostModify Event in Intent (ETO)

1 REPLY 1
Reply
Message 1 of 2
ddickey
424 Views, 1 Reply

PostModify Event in Intent (ETO)

Is anyone familiar with creating events in Inventor ETO (Intent)? I have a custom UI with the following rules...

 

<%%Category(

"Meeting Rail Inputs")> Rule MeetingRailLocation As Number = uiMeetingRailLocation.value

 

<%%Category(

"Meeting Rail Inputs")>_

Child uiMeetingRailLocation As :NumberProperty

baseName =

"Meeting Rail Location"

Category =

"Meeting Rail"

Seq = 1

CategorySeq = 1

userValue_PostModify_Event = :LinkMeetingRails

End Child

I am trying to fire an event when the Meeting Rail Location is modified AND I also need to get the previous value of that Meeting Rail Location. The WIKI Help says you are suppose to be able to do both but I have not been able to get it to work. It says to create <ruleName>_postModify and so I did. I assume <ruleName> is the same as the name of the rule you want to monitor for changes but maybe that is not right. And it doesn't explain exactly how to get the previous value. I created the following method and it doesn't seem to fire.

 

Method MeetingRailLocation_PostModify() As List

' Get old value for MeetingRailLocation

Dim lstActions As List = {}

' Get all meeting rails that are of the same orientation except self and set them to 30

ForEach mr In Window.AllMeetingRails

If mr.refchain <> self.refchain Then

If mr.FrameOrientation = self.FrameOrientation Then

' Will also add condition to see if this meeting rail location matches the previous value

' but not yet sure how to do that so will skip for now

lstActions = lstActions + {:action,:CreateDynamicRule,:part,mr.uiMeetingRailLocation,:name,:USERVALUE,:formula,

"30"}

EndIf

EndIf

Next

Return {lstActions}

End Method

 

Of course instead of changing the values to 30 I want to change it to the previous value. I have followed the online instructions about creating Events for Inventor Engineer-To-Order but it doesn't seem to be firing. I appreciat any help you can give. Thanks!

1 REPLY 1
Message 2 of 2
ddickey
in reply to: ddickey

UPDATE: Since this is a custom UI the third party developer told me I had to tell who the event host was as shown below...

 

userValue_EventHost = Me

And then I had to create a method to run event actions...

Method LinkMeetingRails() As List

...

End Method

 

So the event fires now.

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

Post to forums  

Autodesk Design & Make Report