« Create Section View Parallel to Wall | Main | AEC DevCamp 2012 Material »

June 18, 2012

Comments

Hi Jeremy,

some other view stuff:

When using UIDocument.ShowElement(...), Revit will search for a "good" view.

Imagine you want to show a chair in inside a building, residing on level 1.
There may be an opened viewplan, but it is showing level 0, not 1.

When invoking UIDoc.ShowElement(chair), Revit knows that there is no vaild view opened for this chair.
If there is also the {3D} view opened, Revit may switch to that view because our chair may be visible in that view.

Depending on the view angle, there may be some walls that hide the chair in the 3D view, so Revit's chosen view isn't a "good" view at all.

Is there a way to avoid Revit to open such a *false* view ?

Cheers,
Rudi

Hi Jeremy, This is very helpful, and timely, thanks. I have been struggling to simply Zoom Fit a view, and I am not sure this will help. Am I missing something obvious? Regards, Dale

Dear Dale,

Thank you for your appreciation, and I am glad you find it useful.

If you know the extents of the zoom fit this should suit your bill.

I would assume that the standard Revit zoom fit functionality just zooms to a region including all the element bounding boxes, and you can determine those yourself as well.

So it should work as far as I can tell.

Cheers, Jeremy.

Dear Rudi,

I am not aware of any solution to that, sorry.

Cheers, Jeremy.

Hi Jeremy,
thanks for this great post.
We are currently developing a gesture control app with kinect and were thinking about orbiting and panning.
But in 3D-View it is kind of difficult to manage these operations by modifing the Coords.
Do you have a good hint for a solution for us?

Cheers,
Alex

Hi Alex,

Thank you for your appreciation. Glad you like it.

Great, your project sounds obercool.

No, I'm afraid I do not have any particularly good hints for you. I would have to do the same research as you. The view manipulation is a bit fiddly.

The best I can provide is all published:

http://thebuildingcoder.typepad.com/blog/view

I am very interested in hearing what you find out and how you solve this!

Cheers, Jeremy.

UIView.ZoomToFit() was added to the API in 2014

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)

Jeremy Tammik

AboutTopicsIndexSource