Inventor Engineer-To-Order (Read-Only)
Welcome to Autodesk’s Inventor ETO Forums. Share your knowledge, ask questions, and explore popular Inventor ETO topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PostCreateSelf() not fired

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
MarkBrouwersIntent
563 Views, 3 Replies

PostCreateSelf() not fired

Hi,

What could be the cause that a PostCreate event is not being evaluated/executed ? I've got a child rule with a postcreateself method in it's design and this method is executed when I manually add this child to a node in the modeltree. This child is also used a lot in other higherlevel designs as a childrule, and here the event is not fired.

If I execute via the console the postcreateself() method, I get a return value, something like this :

{{:Action, :createDynamicRule, :Part, Root.Unit_1.LW1, :Name, :Vertikalen, :formula, "{Root.Unit_1.LW1.Deur_1.LinkerKoker}"}}

So it looks like the implementation of the eventhandler contains no errors. Am I overlooking something ?

 

Cheers,

Mark

3 REPLIES 3
Message 2 of 4

Hi Mark,

 

Though I am not an ETO expert, my gut feeling is that each higher level design should have thier own PostCreateSelf() child rule, and then refchain in your PostCreateSelf() of higher level design should change accordinly to address wrapped children.

 

Regards,

-Ishwar N

Message 3 of 4

Hi,

Correct me when I'm wrong. Apparantly the event is only triggered when I dynamically add a child (via the UI) and not when the child is added via the 'normal' design rules.

 

Cheers,

Mark

 

Message 4 of 4

Sorry for not replying sooner.

 

Yes, you are correct, it only applies to newly-created dynamic rules.  PostCreateSelf is intended to be an event that tells you when the dynamic child rule has been added, so you can add or remove or modify any related rules at that time.

 

There is some other rule ("onCreate", I think) which is called every time any part is instantiated.  But it is difficult or impossible to use reliably, since you cannot predict when a Child rule will be unbound and re-evaluated.


Jon Balgley

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

Post to forums  

Autodesk Design & Make Report