Fitview

I use microstation 08.11.09.578, DGN 2D V7 Upgrade V8

I want to click the FITVIEW button

...

MicroStationDGN.View v = app.ActiveDesignFile.Views[1];
v.Fit(true);

I tried this code but no success
Is there any method to call the function 'FITVIEW' or similar

Parents
  • Hi,

    I want to click the FITVIEW button

    No, you do not want. Or, if you really want to "click the button", your code is wrong.

    Do not mix MicroStation GUI and MicroStation API (regardless VBA/COM or native). MicroStation tools are typically represented by key-ins (and further by icons/button in some cases), calling internally the same API as yours.

    So to "click the button" lead to call proper key-in (probably something like "fit view extended 1", whereas to "use API to fit a view" lead to new code, implementing the same functionality.

    I tried this code but no success

    What does it mean? "No success" is pretty subjective and tells nothing. Be developer, be detailed and accurate.

    I tried this code

    Did you read API documentation? What I see in VBA Fit method description:

    Fit does not redraw the view. To show the change in the view,
    call the View.Redraw method. 

    With regards,

      Jan

Reply
  • Hi,

    I want to click the FITVIEW button

    No, you do not want. Or, if you really want to "click the button", your code is wrong.

    Do not mix MicroStation GUI and MicroStation API (regardless VBA/COM or native). MicroStation tools are typically represented by key-ins (and further by icons/button in some cases), calling internally the same API as yours.

    So to "click the button" lead to call proper key-in (probably something like "fit view extended 1", whereas to "use API to fit a view" lead to new code, implementing the same functionality.

    I tried this code but no success

    What does it mean? "No success" is pretty subjective and tells nothing. Be developer, be detailed and accurate.

    I tried this code

    Did you read API documentation? What I see in VBA Fit method description:

    Fit does not redraw the view. To show the change in the view,
    call the View.Redraw method. 

    With regards,

      Jan

Children