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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

API about any view mode

rkhvostikov
4-Participant

API about any view mode

Hi!

How do I detect that a user currently rotates/pans/zooms a view? Or any other view modification is being performed by a mouse or by any commandfrom toolbars/menu ?

Is there any API for this?

Thanks in advance!

8 REPLIES 8

I think there is no "notification" command _PRE or _POST for model rotation or panning.

As far as I know the only possible way to find out if there was a change in viewing/zoomin/panning: functions that read the view transformation and the screen transformation - there the zoom and pan is stored and it changes when the model has been rotated or zoomed. But this is not a "event" trigger of course.

Greetings from Frankfurt/Germany

Andreas

__________________________________

Andreas Hellmann
MCAD Services Pro/E & Pro/E customization

phone: +49 6145 598296
mail: -

Andreas is absolutely correct. This cannot be achieved with Pro/TOOLKIT WF 3.0 anyways. Why is this required?

Patrick Williams | Sr. Applications Engineer | Engineering Systems | Steelcase Inc. | 616.698.4078 | My Site<">http://my.steelcase.com/Person.aspx?accountname=NA\PWILLIA3>

[cid:image001.jpg@01C9F415.D90258B0]

Hi Roman,
I would use notifications PRO_MDL_DISPLAY_POST or PRO_MDL_DISPLAY_PRE, where I'd stored previous transformations and compare it with the current one.

Regards,

Vladimir


In Reply to Roman Khvostikov:

Hi!

How do I detect that a user currently rotates/pans/zooms a view? Or any other view modification is being performed by a mouse or by any commandfrom toolbars/menu ?

Is there any API for this?

Thanks in advance!

No! I ment wholly different.

You know that there is a button "Zoom In" in the "View" toolbar. You toggle it and point a rectangle to zoom to.

Now imagine my application intercepts mouse events (WM_LBUTTONDOWN in particular). When "Zoom in" button toggled I need to know about it. In order to do nothing in this situation.
Is there any API to get known this?

Look at ProNotificationSet() using the ProMdlDisplayPreAction.

Patrick Williams | Sr. Applications Engineer | Engineering Systems | Steelcase Inc. | 616.698.4078 | My Site<">http://my.steelcase.com/Person.aspx?accountname=NA\PWILLIA3>

[cid:image003.jpg@01CA1673.EAEBC310]

What special do I have to find there. I know about this notification.
How can it help me?





In Reply to Patrick Williams:
Look at ProNotificationSet() using the ProMdlDisplayPreAction.

I don't know if this will work but try these steps...

ProMdlDisplayPreAction

1. Check if the global matrix has been filled yet.

2. If it has been filled then...

a. Retrieve the current view matrix. If the current view matrix is different than the one in global scope then try the following...

i. Set the view matrix to the one in global scope.

ii. If all you want to do is control zoom then modify the current view matrix[3][3] (zoom value) value to that of globalMatrix[3][3] and then set the view matrix.

iii. Try returning PRO_TK_GENERAL_ERROR which may stop the pan zoom operation.

iv. My vote would be the second option.

ProMdlDisplayPostAction

3. Retrieve the current view matrix and store it globally.

To analyze the matrix values read the api wizard under User's Guide->Coordinate Systems and Transformations->Coordinate System Transformations. You will see a diagram of a matrix and what value holds the zoom value. Good luck!

Patrick Williams | Sr. Applications Engineer | Engineering Systems | Steelcase Inc. | 616.698.4078 | My Site<">http://my.steelcase.com/Person.aspx?accountname=NA\PWILLIA3>

[cid:image002.jpg@01CA1676.7F8512E0]

well, thanks, but again you misunderstand my problem

once again:
1) user opens a model,
2) user toggles "Zoom in" button in the "View" toolbar
3) the button becomes pressed and the ProE awaits for user to select a rectangle (to which to zoom),
4) user aims the mouse at some point and presses down left mouse button
5) at this moment I catch WM_LBUTTONDOWN notification
6) at this situation ("zoom in" mode is toggled) I have to do noting,
7) note! that no rotation/paning/zooming has been performed yet

how do i known that "zoom in" mode is toggled?
Top Tags