cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Notify Event Help

Marble

Notify Event Help

Greetings,
I am retrieving an assembly, and when every component is retrieved
I need to perform an operation on every part. In my toolkit dll I have
set up a notifcation for PRO_MDL_RETRIEVE_POST_ALL. I can see thru the
trail file that the call is indeed being made for every part. However,
during every call to my notification function I am checking the name
using promodelnameget and it always returns the assembly name that I
chose to open. That is not the behaviour I expect for the
PRO_MDL_RETRIEVE_POST_ALL notification. Below is the wizards
explanation of all events.


* Post-file management (all events)--This is the same as the
post-file management event above, except the callback function is called
for all secondary file management events on models other than the one
explicitly specified. For example, if you save an assembly, the callback
function is also called for any modified parts that are saved as a
result of that action.


I expect every call to give me the mdl handle for the component being
retrieved. Is my expectation correct?
In my callback function I was using status = ProMdlCurrentGet (&mdl)
and it kept giving the same model, so I have tried in my function call
to pass in the mdl. MyRetrievePost(ProMdl mdl). That seems to give
me no model. Is there a way to get the model handle that I am not
seeing?

Thanks for any help.

int user_initialize()

ProNotificationSet(PRO_MDL_RETRIEVE_POST_ALL, MyRetrievePost);











Mark Steffke
Engineering System Administrator
The Delfield Company
Manitowoc Foodservice
T 989.775.9215 or 989.773.7981, ext 12484
Integrity, Commitment to Stakeholders, and Passion for Excellence

1 REPLY 1

Notify Event Help

Mark,
You have to first understand the parameter that you are being passed in your action function for the PRO_MDL_RETRIEVE_POST_ALL notification. You are getting a ProModel handle to the top-level assembly. Calling ProMdlCurrentGet in the action function will always return you a ProMdl handle to the current model which is the top-level assembly.

Now, in the callback function for the PRO_MDL_RETRIEVE_POST action you will be passed a ProMdl parameter which is a handle to the model currently being retrieved. The documentation for this even states that it is NOT called for each model that is retrieved due to an upper-level assembly retrieval but I believe that it is in fact called for each sub-component. Of course from that ProMdl handle you can then inspect the desired attributes of the model.

I wish I had the code that I created for a similar project but that was at a previous employer...:(

Patrick Williams | Engineering Systems | o: 616.698.3766 | c: 616.947.2110
[cid:image003.jpg@01CCCF9D.276CF950]
Announcements